Newbie forms question: go to last?

  • Thread starter Thread starter JMF
  • Start date Start date
J

JMF

I've made a simple form for data entry to a table.

But the form, when I open it, always positions me at the first record in the
table. Now, of course, I can press the button at the bottom of the form to
"add a new record", but
I'd like it to position me for "adding new records" automatically as soon as
I open it.

I'm betting there's a simple Visual Basic command I can attach to the open
event somehow to make this happen. Could somebody point me in the right
direction?

Thanks!

John
 
JMF said:
I've made a simple form for data entry to a table.

But the form, when I open it, always positions me at the first record
in the table. Now, of course, I can press the button at the bottom of
the form to "add a new record", but
I'd like it to position me for "adding new records" automatically as
soon as I open it.

I'm betting there's a simple Visual Basic command I can attach to the
open event somehow to make this happen. Could somebody point me in
the right direction?

Thanks!

John

Either set the DataEntry property of the form to Yes or open with VBA command
OpenForm with the acFormAdd option of the DataMode argument.

DoCmd.OpenForm "FormName",,,,acFormAdd
 
Open your form in design view and right click on the empty area (the grey
space outside the area where you have put your design). Open the properties
menu and select Data. Ensure you have set the Data Entry to "Yes" and this
will open the form each time on a new record.

Hope this helps
 
Back
Top