Hi John,
When you followed Damian's suggestion, which should work, did you simply type:
docmd.GoToRecord acDataForm, me.name, acLast
into the On Open shown on the Event tab? If this is what you did, then that
is incorrect. With the Properties dialog displayed, select the Event tab. The
word "Form" should be shown in the blue title bar, if you are viewing the
properties for the form. Click your mouse into the On Open event procedure.
Select [Event Procedure] from the dropdown list. Then click on the Build
button (the button with the three dots). This should open up a module
associated with your form. You should see the following:
Option Compare Database
Option Explicit
Private Sub Form_Open(Cancel As Integer)
End Sub
Special Note: If you do not see the second line of code shown above, "Option
Explicit", then go fix this problem right now. Here is a short gem tip that
discusses these two very important words:
Always Use Option Explicit
http://www.access.qbuilt.com/html/gem_tips.html#VBEOptions
Now add the line of code that Damian suggested, so that your new Form Open
event procedure looks like this:
Option Compare Database
Option Explicit
Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord acDataForm, Me.Name, acLast
End Sub
Then click on Debug > Compile ProjectName, where ProjectName is the name of
your VBA project (likely the same as the name of your database). Close the
VBA Editor, save the changes, and test out your form.
Tom Wickerath
Microsoft Access MVP
http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
John Calder said:
Thank you Damian
When I do this I ger an error message saying "Cannot Find Macro docmd" ??
Any ideas
Thanks