Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Newtown, Pennsylvania, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Command buttons on a subform

    I want to add navigation buttons to the top of a subform, rather than use the built in navigation buttons, because they may be 'hidden' on some of the small screens we have. I have created the buttons, and have the following code:

    Private Sub cmdFirst_Click()
    On Error GoTo Err_cmdFirst_Click


    DoCmd.GoToRecord , , acFirst

    Exit_cmdFirst_Click:
    Exit Sub

    Err_cmdFirst_Click:
    MsgBox Err.Description
    Resume Exit_cmdFirst_Click

    End Sub

    However, this generates a long error message that says a problem occurred while MS Access was communicating with the OLE server or Active X control.

    How do I get this to work? I tried debugging by inserting a break point in the above code, but I never seem to get there!

    Thanks,

    kiwi44

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

    Re: Command buttons on a subform

    Your problem is elsewhere or your form is corrupt. That same code works flawlessly in custom navigation buttons on subforms in many of my databases.
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Newtown, Pennsylvania, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Command buttons on a subform

    Thanks, Charlotte. After reading your post I thought I would try the 'Create new database and import everything from the old one' routine. It worked, and the subform now works as it should.

    Kiwi44

Posting Permissions

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