DaveMere
Registered User.
- Local time
- Today, 23:08
- Joined
- Sep 18, 2002
- Messages
- 63
Hi all.
I've written some code in the form_current procedure that is designed to query the user when they try to create a new record, then proceed accordingly. Basically;
If msgbox ("Confirm") = vbYes then
(Run query to fetch next primary key and create new record)
(This bit works fine.)
Else
DoCmd.GoToRecord acActiveDataObject, , acLast
(This bit is where the problem is)
End if
This DoCmd statement does not seem to go to the last record in the available set - it just leaves the primary key field blank. I've tried variations on the statement; such as acGoTo (variable) and even acFirst, none of which take me to a different record.
What am I doing wrong?
Thanks
DaveMere
I've written some code in the form_current procedure that is designed to query the user when they try to create a new record, then proceed accordingly. Basically;
If msgbox ("Confirm") = vbYes then
(Run query to fetch next primary key and create new record)
(This bit works fine.)
Else
DoCmd.GoToRecord acActiveDataObject, , acLast
(This bit is where the problem is)
End if
This DoCmd statement does not seem to go to the last record in the available set - it just leaves the primary key field blank. I've tried variations on the statement; such as acGoTo (variable) and even acFirst, none of which take me to a different record.
What am I doing wrong?
Thanks
DaveMere
Last edited: