Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Move in the records of the subform (Access 2000)

    If i have records in a single form, then i can move between the records
    like with my button called CmdFro like that :

    On Error GoTo Err_CmdFro_Click
    DoCmd.GoToRecord , , acPrevious
    Exit_CmdFro_Click:
    Exit Sub
    Err_CmdFro_Click:
    MsgBox Err.Description
    Resume Exit_CmdFro_Click

    In the above case i move backwards.However this command does not work if the records are
    in the subform.Then i receive the message " you cant go to the specified record."
    How can i coordinate the button in the main form to move in the records of the subform?
    ( in my case going to the previous records)

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

    Re: Move in the records of the subform (Access 2000)

    To move to another record in a subform, the subform must have the focus.

    On Error GoTo Err_CmdFro_Click
    Me.SubformControlName.Setfocus
    DoCmd.GoToRecord , , acPrevious
    Exit_CmdFro_Click:
    Exit Sub
    Err_CmdFro_Click:
    MsgBox Err.Description
    Resume Exit_CmdFro_Click
    Francois

Posting Permissions

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