Results 1 to 2 of 2
  1. #1
    meissnerb is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2012

    Code to open form, open a new record, input data, then close form

    I have a separate form setup in my database for new entries. On the main form I have a button called new entry. I want to write a code that allows me to open that form from the button. When the new entry form opens I want it to automatically open a new record in the table then once the user enters in the data they can press a button that closes that form. Any help is appreciated.

    Thank you

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Nevada, USA
    Set the data entry property of your form to Yes and it will open to a new record. If you want to use the same form for entry and edit, there's an argument of OpenForm that determines which mode it opens in.
    Paul (wino moderator)
    MS Access MVP 2007-2019

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 11
    Last Post: 01-26-2012, 01:22 PM
  2. VB Code to open a form?
    By HeadGasket in forum Access
    Replies: 1
    Last Post: 01-24-2012, 08:26 PM
  3. Open Form and Close Previous Form
    By gerrymouse1 in forum Forms
    Replies: 3
    Last Post: 04-19-2011, 05:42 AM
  4. Open Form with instance method & wait to close?
    By GeorgeBakoyannis in forum Forms
    Replies: 1
    Last Post: 10-09-2010, 11:00 AM
  5. Replies: 2
    Last Post: 02-26-2010, 08:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Other Forums: Microsoft Office Forums