Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Going to a new Record (access 97)

    I would like to have a button on a subform that when pressed would take me to the next record on the main form which by there linked fields would be the next form on the sub form as well. Does anyone have some code to do this? Thanks. And God Bless.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Going to a new Record (access 97)

    DoCmd.GoToRecord , , acNext
    Charlotte

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Going to a new Record (access 97)

    Or, you can use: RunCommand acCmdRecordsGoToNext
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    New Lounger
    Join Date
    May 2002
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Going to a new Record (access 97)

    Wouldn't this code just go to the next record on the subform, if the command button is on the subform?

    Don't you need something like:
    me.parent.recordsetclone.movenext
    me.parent.bookmark=me.parent.recordsetclone.bookma rk

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Going to a new Record (access 97)

    I didn't post a full routine, simply one line of code. The simplest way to implement it, would be set set the focus back to the parent form and then issue the DoCmd or RunCommand statement.
    Charlotte

Posting Permissions

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