+ Reply to Thread
Results 1 to 2 of 2

Thread: opening a form with a command button on a data access page

  1. #1
    Registered User
    Join Date
    12-15-2011
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    6

    opening a form with a command button on a data access page

    hello,
    i am using ms access 03 and am trying to add a button to open a form. seems like it should be fairly straightforward, but i can't figure this out at all...
    any help appreciated, ty

  2. #2
    Valued Forum Contributor alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Lake County, Illinois
    MS-Off Ver
    MS Office 2010, 2007 and 2002
    Posts
    1,161

    Re: opening a form with a command button on a data access page

    Here is code to open a form called "SearchForm" using a command button.

    Private Sub Command107_Click()
    On Error GoTo Err_Command107_Click
    
        Dim stDocName As String
        Dim stLinkCriteria As String
    
        stDocName = "SearchForm"
        DoCmd.OpenForm stDocName, , , stLinkCriteria
    
    Exit_Command107_Click:
        Exit Sub
    
    Err_Command107_Click:
        MsgBox Err.Description
        Resume Exit_Command107_Click
        
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0