469,270 Members | 1,117 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

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

115 100+
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)>

3 91706
missinglinq
3,532 Expert 2GB
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
259 100+
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
Nkosi
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.

Similar topics

19 posts views Thread by Joe Scully | last post: by
27 posts views Thread by Kim Webb | last post: by
1 post views Thread by chrislewis21 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.