Results 1 to 6 of 6

Thread: New to Access!

  1. #1
    Join Date
    Oct 2011
    Posts
    3

    Post Unanswered: New to Access!

    Hi,
    I'm just getting to know Access, so please bear with me as I'll probably be asking for help quite often!!
    Is there a way that when a form is opened by a user, it automatically goes to a new record, rather than the first record?
    Thanks,
    Last edited by notrutsa; 10-30-11 at 04:29. Reason: Amendment

  2. #2
    Join Date
    Aug 2006
    Posts
    52
    Hi
    try to use this code in form load event

    DoCmd.GoToRecord , , acNewRec

    it would look like this
    Private Sub Form_Load()
    DoCmd.GoToRecord , , acNewRec
    End Sub

  3. #3
    Join Date
    Oct 2011
    Posts
    3
    Thanks for your reply,

    Unfortunately, I don't know how to write the macro codes as yet, do you if it can be done using the Property Sheet?

    Thanks,

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    1. Open the from in Design view.
    2. Open the Properties window.
    3. Check that the form itself is selected (black square in the upper left corner of the form).
    4. Select the Event tab of the Properties window.
    5. Click in the "On Load" line.
    6. Click on the little square button with 3 dots (...) that appear on the righ of the line.
    7. If asked ("Choose Bilder" window appears), select "Code Builder").
    8. The VBA editor opens and the declaration for the Sub Form_Load is there:
    Code:
    Private Sub Form_Load()
    
    End Sub
    9. Copy and paste the line (DoCmd.GoToRecord , , acNewRec) between the line Private Sub... and the line End Sub.

    That's it!
    Have a nice day!

  5. #5
    Join Date
    Oct 2011
    Posts
    3

    Thumbs up

    Thank you both for your help!!

  6. #6
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You're welcome!
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •