Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BOF and EOF problem with cmdbutton

Status
Not open for further replies.

Tailgun

Technical User
Mar 30, 2002
417
US
What is wrong with this code?? Please help while I still have some hair left. :)

Private Sub cmdSave_Click()
If Adodc3.Recordset.BOF = True And Adodc3.Recordset.EOF = True Then
Adodc3.Recordset.CancelUpdate
Adodc3.Recordset.Close
Set Adodc3.Recordset.ActiveConnection = Nothing
Else
Adodc1.Recordset.Update
Adodc1.Recordset.Requery
Adodc2.Recordset.Update
Adodc2.Recordset.Requery
Adodc3.Recordset.Update
Adodc3.Recordset.Requery
End IF
End Sub

I still get the error Either BOF or EOF is True etc etc
I have also tried .cancelbatch and just .cancel nothing works :(

Thanks for any and all help
 
Have you tried just removing the cancleupdate line altogether. BOF and EOF true says there are no records in the recordset so the update hasnt started... or words to that effect.
 
Thanks I was wayyyyy sleepy when I started this thread. Then woke up later with the solution.

Thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top