Newbie forms question: go to last?

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
 
R

Rick Brandt

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
 
G

Guest

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
 
J

JMF

Thanks, Rick. I appreciate also having the VBA command - that'll come in
handy, too.

John
 

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