vb: How do you make the following statement: If the information is incomplete, the database input wi

Updated on technology 2024-02-08
17 answers
  1. Anonymous users2024-02-05

    if = "" or = "" or = "" or = "" or = "" then

    msgbox "Please enter full details! ", 64, "Tips"

    username") = trim(

    password") = trim(

    name") = trim(

    name id") = trim(

    msgbox "Registration is successful"

    end if

  2. Anonymous users2024-02-04

    You're done with this, use an if...else is OK.

    Why do you still ask, or do you have other questions?

    Ok upstairs

  3. Anonymous users2024-02-03

    I've had this issue as well. There were more than 700 records at the time.

    If there is no corresponding field to determine the modification, I advise you to manually modify the data that you have modified.

    I just added it myself. Depressed.

  4. Anonymous users2024-02-02

    Literally, the ** on the first floor is the same as the landlord.,It is estimated that the landlord's actual ** has more spaces due to hand errors and other reasons:'" & a & " 'Here you should pay attention to the fact that there should be no spaces between single and double quotation marks, and ensure that there are no spaces when entering text, or when assigning values, you should deal with a=trim(.

    Hope it helps.

  5. Anonymous users2024-02-01

    "select * from where field in the table ='"+trim(variable)+"'"

    trim is to remove the spaces on both sides of the variable, if the field is not character-based then do not use single quotation marks, if it is a date, use instead of single quotation marks.

  6. Anonymous users2024-01-31

    It depends on the type of argument you have.

    If it's a character:

    select * from table where field name ='"& Variables &"'"

    If it's numeric, it's logical.

    select * from table where field name ="& If the variable is a date.

    select * from table where field name ="& Variables &"#

  7. Anonymous users2024-01-30

    select * from Basic Student Information, Experimental Grade List where Basic Student Information. Student ID = List of experimental grades. Student ID and list of lab scores. Teacher number ='"trim$(

    All you need is a single set of quotation marks, and the key question should be whether your login screen uses "unload me" when you jump to the next screen, and if you do, the form will be uninstalled, and there will be nothing in it.

    Change unload me to record the data entered, and you can try it.

  8. Anonymous users2024-01-29

    Create two global variables to hold the username and password.

    Save the value of sum in these two variables during the login process, and then use these two global variables in any other form.

  9. Anonymous users2024-01-28

    Teacher number =''trim$(

    Changed to: Teacher No. ='"trim$(

  10. Anonymous users2024-01-27

    I think it's better to use late bindings.

    public conn as

    public xs as

    public rs as

    Instantiation before the variable is used.

    set conn=new

    set rs=new

    sql,conn,3,3

    Using late bindings may solve the problem, after which the variables will remain in effect within the scope of your declaration.

  11. Anonymous users2024-01-26

    Here it is recommended to use the adodb control and the datagrid control to make it simpler, the first is to create a new datagrid1 control and also to adodc1 control.

    Second, make the adodc1 database connected (will that?) The record source in the adodcn attribute is set to 8....The command text is :

    select *from tablename) to set the datasource property of datagrid1 to adodc1

    Thirdly, set the datasource property in each of your textboxes to adodc1, and the datafield will select the corresponding fields you want to display in the current corresponding textbox, and set each textbox separately.

    And then it's done!

    Make another delete button.

    ** Below, very simple.

    if = true then

    msgbox "There are no records that can be deleted"

    exit sub

    end if

    withif not .eof and not .bof then

    if msgbox("Confirm the deletion of the current record? ", vbyesno + vbquestion) = vbyes then

    delete

    movenext

    if .eof then .movenext

    end if

    end if

    end with

    exit sub

    end sub

    The content of the text box will change to the value of a field that is currently recorded by the mouse! ,Of course, you can also don't,,Don't just make a similar,Next,Previous similar button!

    If you want to modify it, you can modify the data directly in it.

    Because the data is bound to the textbox, the data will be automatically updated with every change, and of course you can also make a button, so I won't say anything about it.

    How, doesn't it look much simpler?

  12. Anonymous users2024-01-25

    Just tick the deletable and modifiable checkboxes in the properties of the datagrid.

  13. Anonymous users2024-01-24

    sql = "select * from class information where name='" & trim( &"'"

    sql, conn, adopenstatic, adlockoptimistic

    yn = msgbox("OK to delete", vbyesno)if yn = 6 then

    end if

    If there are multiple records of Zhang San, only the first record can be deleted.

    If you want to delete multiple records that are queried, make a loop.

  14. Anonymous users2024-01-23

    The deletion of the database does not need to be updated, you delete it and try to add another sentence to refresh the database.

  15. Anonymous users2024-01-22

    if yn = 6 then

    Data is removed from the vb control, but no data manipulation is done on the database.

    end if

  16. Anonymous users2024-01-21

    strsql = "update Balance from Fuel Card Set Balance = Balance+" & a & "where card number like'%" & trim( &"%'"

    The premise is that both the balance and the A are numeric.

  17. Anonymous users2024-01-20

    a = trim(

    strsql = "update Balance from Fuel Card Set Balance = Balance+" & a & "where card number like'%" & trim( &"%'"

Related questions
7 answers2024-02-08

fuction should be functional

wub should be sub >>>More

5 answers2024-02-08

F get domain contrast is a formatting function (should be written by yourself), the first parameter (arg prod spec id) according to the second parameter (120) formatting and return the result to the v bill code, according to the function naming method, the above ** should be the standard format for getting the date.

14 answers2024-02-08

private sub form_load()

Songti")"Italics GB2312") >>>More

6 answers2024-02-08

I forgot what the ascii code is.,You just look for it.,This ** is very simple.,It's a case of imitation keyboard.。 >>>More

10 answers2024-02-08

a = "n c hundred du q49232 ah ah ah pp"

mid(trim(a), 9, 5) 'From the 9th character from left to right (spaces are also counted), count 5 characters you want. >>>More