Then click next to implement a data show,,,
Studied a afternoon today, found to be in the form when you load. The fields caused you. Anything movenext cannot be used, an error code such as screenshots, code is as follows, please solve
Private Sub Form_Load ()
Timer1. Enabled=True
Timer1. Interval=1000
Label_Time. Caption="Current time:" & amp; Now
Display the current time
'
Label_NT. Caption="Login NT:" & amp; Form_Login. Text_NT. Text
Label_User. Caption="Login User:" & amp; Form_Login. Adodc1. You. Fields (" UserName ")
'according to the login screen show the login account and name
Adodc1. The ConnectionString="Provider=Microsoft. Jet. The OLEDB. 4.0; Data Source="& amp; App. The Path & amp; "\ Userlog. MDB; The Jet OLEDB: Database Password=123; Everyone, 123
"
Adodc1.Com mandType=adCmdText
Adodc1. RecordSource="select * from PCBA_Basic_Information"
Adodc1. Refresh
If Adodc1. You. Fields (" Status ")=true Then
Label_Status. Caption="activate"
The Else
Label_Status. Caption="failure"
End the If
End Sub
Private Sub Com_Next_Click ()
With Adodc1. You
. MoveNext
If the EOF Then
. MoveLast
MsgBox "has been in the end,", "note"
End the If
End With
End Sub
CodePudding user response:
Try to put the code on Form_Activate (inside), not in Form_Load ()CodePudding user response:
Not, o brother, is still the same error,,, the code is the same, I feel you should be the fileds after me to query the value of the column, then. You. Movenext just can't run,,,,,,, I think that is what needs to be a sentence, let you get to the point to the data line,,,,CodePudding user response: