Hi,
I'm trying to save a new record, SQL Server table in the backend and Access 97 frontend, by going to the previous record and then back to the present one. That part works, but when I'm on the first record I get the previous record error and the DB crashes. I put in the BOF part in to check if I'm on the first record, but it isn't working properly. MYDB and Mytable are referenced publicly. Not sure if I have to use recordsetclone.
Any help would be greatly appreciated.
Thanks
Sydney
I'm trying to save a new record, SQL Server table in the backend and Access 97 frontend, by going to the previous record and then back to the present one. That part works, but when I'm on the first record I get the previous record error and the DB crashes. I put in the BOF part in to check if I'm on the first record, but it isn't working properly. MYDB and Mytable are referenced publicly. Not sure if I have to use recordsetclone.
Code:
Set MyDB = CurrentDb
Set MyTable = MyDB.OpenRecordset("qryMainForm", dbOpenDynaset, dbSeeChanges)
If Not rst.BOF Then
Application.Echo False
DoCmd.GoToRecord , , acPrevious
DoCmd.GoToRecord , , acNext
DoCmd.GoToControl "cboLitType"
Application.Echo True
Else
Exit Sub
End If
If MyDBOpen = True Then MyDB.close: MyDBOpen = False
If MyTableOpen = True Then MyTable.close: MyTableOpen = False
Any help would be greatly appreciated.
Thanks
Sydney