Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Canada
    Posts
    284
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to go to last record in a continuous form (Access 2000)

    I have a button on a form that opens my frmNewFees form. When it opens it shows a continuous form of all the fees that are already entered. Is there any way to get it to go to the last record or a new record when the form opens? That way my users don't have to scroll down a long list of fees before they can enter a new fee.

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to go to last record in a continuous form (Access 2000)

    In the on load event of the form use :
    Private Sub Form_Load()
    DoCmd.GoToRecord acDataForm, Me.Name, acLast
    End Sub
    Francois

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to go to last record in a continuous form (Access 2000)

    Sorry, I've read the post not completely.
    For a new record use in the on load event of the form:
    Private Sub Form_Load()
    DoCmd.GoToRecord acDataForm, Me.Name, acNewRec
    End Sub
    Francois

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Canada
    Posts
    284
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to go to last record in a continuous form (Access 2000)

    Thanks, Francois. It works great.

  5. #5
    2 Star Lounger
    Join Date
    Jul 2003
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to go to last record in a continuous form (Access 2000)

    In the DoCmd statement "Me.Name" is a refference to what?

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to go to last record in a continuous form (Access 2000)

    In the code behind a form, Me refers to the instance of the form that is running the code. So instead of referring to Forms!frmNewFees, you can refer to Me. Much shorter and easier. In the instruction Francois posted, Me.Name is the name of the form. He could have used "frmNewFees", but that would cause an error if you decide to rename the form, while Me.Name stays valid.

    Similarly, in the code behind a report, Me refers to the instance of the report that is running the code.

Posting Permissions

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