Need help creating a button that opens a form to a new record

fifieldbl

New member
Local time
Today, 11:46
Joined
May 13, 2011
Messages
9
I'm creating a form similiar to a switchboard. On it I have buttons taking you to various other forms, reports, queries, etc. What I'm trying to figure out is how do I create a button that will open a different form to a new record only.

Brian
 
Welcome to the forum.

Have a look a the DoCmd.OpenForm command in conjunction with DoCmd.GoToRecord, the code might look something like;
Code:
    DoCmd.OpenForm "YourFormName", acNormal
    DoCmd.GoToRecord , , acNewRec
Alternately you can simply use;
Code:
DoCmd.OpenForm "YourFormName", acNormal, , , acFormAdd
However be aware that the acFormAdd mode will only allow your user to add and then view records that have been added during this instance of the form's opening; existing records will not be available for viewing or editing.
 
Thank you very much. That is what I was looking for.
 

Users who are viewing this thread

Back
Top Bottom