Opening form to a new record

superrob5

Registered User.
Local time
Today, 17:36
Joined
May 8, 2003
Messages
99
I want to be able to open a form so that all I have to do is type and it would create a new record, instead of scrolling to the end.
 
Code:
DoCmd.OpenForm "MyForm", , , , acFormAdd
 
I just put that under On Current and it didnt go to the last record?
 
You are better off changing the data mode when you open the form. Look up the OpenForm method and its arguments. Using this technique, you can use the same form for edit and add. If you never want to edit with the form, just change its DataEntry property to Yes. That way you won't need any code. The form will always open to an empty record.
 
superrob5 said:
I just put that under On Current and it didnt go to the last record?

Where did you get the notion to put the code in the OnCurrent event?
 
ummm now that I think about it should it just go to onload??

Rob
 
No! It goes on the button Click() you press to open the form.
 

Users who are viewing this thread

Back
Top Bottom