By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,947 Members | 1,548 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,947 IT Pros & Developers. It's quick & easy.

Add a button to a form to add new (blank) record

100+
P: 115
Hi i searched here but i didn't find out how to add a button and when i click on this button to open a new blank record?
I could really need some help. many thanks :)
Aug 7 '10 #1

✓ answered by missinglinq

Are you ready to quote Homer Simpson and say "Doh?"

In Form Design View, add a Command Button to you form, and when the Command Button Wizard comes up, under "Categories" click Record Operations, then under "Actions" click on Add New Record. Follow the prompts and you're done.

The pertinent VBA code generated will be

DoCmd.GoToRecord , , acNewRec

Linq ;0)>

Share this Question
Share on Google+
3 Replies


missinglinq
Expert 2.5K+
P: 3,532
Are you ready to quote Homer Simpson and say "Doh?"

In Form Design View, add a Command Button to you form, and when the Command Button Wizard comes up, under "Categories" click Record Operations, then under "Actions" click on Add New Record. Follow the prompts and you're done.

The pertinent VBA code generated will be

DoCmd.GoToRecord , , acNewRec

Linq ;0)>
Aug 7 '10 #2

Jerry Maiapu
100+
P: 259
Just for your infor: If the wizard does not start/pop-up, simply
copy and paste this code missinglinq gave on the On_Click event of the New Record button:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.GoToRecord , , acNewRec
Passing by:

JM
Aug 8 '10 #3

P: 3
In 2013 in generates a macro automatically and does not set focus on the first field in the Tab Index (0)
Jul 28 '16 #4

Post your reply

Sign in to post your reply or Sign up for a free account.