Private Sub Command1_Click ()
On the Error Resume Next
With Adodc1. You
Rs. MoveLast
Rs. AddNew
Readers. Fields (" student id ")=InputBox (" please enter the student id: ", "input")
Text1. Text=Adodc1. You. Fields (" student id ")
Fields (" name ")=InputBox (" please input your name: ", "input")
Text2. Text=Adodc1. You. Fields (" name ")
Fields (" gender ")=InputBox (" please enter the gender: ", "input")
Text3. Text=Adodc1. You. Fields (" gender ")
Fields (" institute ")=InputBox (" please enter college: ", "input")
Text4. Text=Adodc1. You. Fields (" institute ")
Number. The Fields (" class ")=InputBox (" please enter the library card number: ", "input")
Text5. Text=Adodc1. You. Fields (" library card number ")
Fields (" politics ")=InputBox (" please enter the contact way: ", "input")
Text6. Text=Adodc1. You. Fields (" contact ")
Fields (" birth ")=InputBox (" please enter the library number: ", "input")
Text7. Text=Adodc1. You. Fields (" number of books ")
Rs. MoveLast
Rs. Update
Adodc1. Refresh
End With
End Sub
The program can run, but always can't add information, please advise
CodePudding user response:
This code strange, didn't you give the definition of rsCodePudding user response:
Rs. The Update (... ) such asOr directly to the db. The execute (insert... )