Results 1 to 5 of 5
  1. #1
    lowells is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    8

    Rookie question on initializing a form to a New record

    I inherited a database with a form for entering data. I would like the form to load and be at the New record. Currently, it is loaded to the first record and I have to then click the New record button provided at the bottom of the form to pull up the "(New)" record for data entry. How do I do that? Thanks.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    set the form dataentry property to Yes?

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    If you only want to be able to Add New Records (but not Edit existing Records) Ajax's suggestion is fine. (DataEntry = Yes)

    To Open the Form directly, in that Form's code window:

    Code:
    Private Sub Form_Load()
      DoCmd.GoToRecord , , acNewRec
    End Sub

    To Open Form from another Form:

    Code:
    DoCmd.OpenForm "Form1", , , , acFormAdd ''' The user can add new records but can't edit existing records.


    OR

    Code:
    DoCmd.OpenForm "FormName", , , , acFormEdit ''' The user can add new records and edit existing records.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    lowells is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    8
    Thanks! DoCmd.GoToRecord worked for me.

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Glad we could help!

    Welcome to AFN!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Rookie Question - Joins, perhaps?
    By broomulack in forum Forms
    Replies: 1
    Last Post: 07-22-2015, 10:45 AM
  2. Form New Record Question
    By RayMilhon in forum Forms
    Replies: 6
    Last Post: 03-14-2014, 02:13 PM
  3. initializing forms
    By sherik in forum Forms
    Replies: 4
    Last Post: 04-21-2013, 01:46 AM
  4. Rookie Question
    By 95DSM in forum Programming
    Replies: 3
    Last Post: 08-02-2012, 10:54 AM
  5. Rookie Messed Up Main Input Form
    By genest11 in forum Forms
    Replies: 2
    Last Post: 01-14-2010, 02:17 PM

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