VBA Code (GoTo New Record)

K

karim

Hello All,
Is there a code to have the form to go to a new record OnOpen using
VB Code? I know how to do this using Macros, but I would like to know how to
do this using VBA. Thanks for your help...
 
J

John W. Vinson

Hello All,
Is there a code to have the form to go to a new record OnOpen using
VB Code? I know how to do this using Macros, but I would like to know how to
do this using VBA. Thanks for your help...

Use the form's Load event (when the recordset has been populated) not the Open
event (which fires before the data is pulled from the table), and use

DoCmd.GoToRecord acForm, Me.Name, acNewRecord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top