Home > Software engineering >  The age-old question remains vb91 errors bother everybody to help me see where is problem
The age-old question remains vb91 errors bother everybody to help me see where is problem

Time:11-06

We use a adodc plug-in, mysql database
The code is as follows:

Private Sub Command1_Click ()
Adodc1. RecordSource="select * from 'student user information table"
Adodc2. RecordSource="select * from 'administrator information table"
Dim As a Single
A=0
If Option2. Value=https://bbs.csdn.net/topics/True Then 'user system
If Option1. Value=https://bbs.csdn.net/topics/False And Option2. Value=False Then
MsgBox "please select your identity" to ensure that identity is not empty
End the If
If Text1. Text="" Then
MsgBox "the user name cannot be empty, please input again" 'ensure that the user name and password is not null

End the If
Do Until Adodc1. You. EOF
If Text1. Text=Adodc1. You. Fields (" student id ") And Text2. Text=Adodc1. You. Fields (" passeord ") Then
The login interface. Hide
Subscribe to the interface. The Show
The Exit Do
A=a + 1
End the If
Loop
If a=Adodc1. You. RecordCount Then
MsgBox "your account or password input error"
End the If
The Else
If Option1. Value=https://bbs.csdn.net/topics/False And Option2. Value=False Then
MsgBox "please select your identity" to ensure that identity is not empty
End the If
If Text1. Text="" Then
MsgBox "the user name cannot be empty, please input again" 'ensure that the user name and password is not null
Text1. SetFocus' cursor returns
End the If
Do Until Adodc1. You. EOF
If Text1. Text=Adodc1. You. Fields (" manager id ") And Text2. Text=Adodc1. You. Fields (" passeord ") Then
The login interface. Hide
The administrator interface. The Show
The Exit Do
A=a + 1
End the If
Loop
If a=Adodc2. You. RecordCount Then
MsgBox "your account or password input error"
End the If
End the If


End Sub

CodePudding user response:

The mysql database connection need to install the mysql driver

CodePudding user response:

With block variable is not set (error 91)
Look at the object does for Nothing
  • Related