+ Reply to Thread
Results 1 to 2 of 2

command button isn't working

Hybrid View

Guest command button isn't working 04-29-2005, 04:06 PM
Guest Re: command button isn't... 04-29-2005, 06:06 PM
  1. #1
    Nydia
    Guest

    command button isn't working

    I have a database and i have a command button on the form.
    on click this opens a report for the specific client on
    the screen. it was working fine, but now doesn't work
    after i did a compact and repair. here is the visual
    basics code

    Private Sub cmdBillingSheet_Click()
    On Error GoTo Err_cmdBillingSheet_Click

    Dim stDocName As String
    Dim stlinkcriteria As String

    stDocName = "rptBillingSheet"

    stlinkcriteria = "[clientid]=" & Me![ClientID]
    DoCmd.OpenReport stDocName, acPreview, , stlinkcriteria

    Exit_cmdBillingSheet_Click:
    Exit Sub

    Err_cmdBillingSheet_Click:
    MsgBox Err.Description
    Resume Exit_cmdBillingSheet_Click

    End Sub


    what's wrong with it? any help is greatly appreciated

  2. #2
    Alan
    Guest

    Re: command button isn't working

    Do you mean a button in the worksheet or a UserForm button, if its a
    worksheet button, right click it and re-assign the macro to it. This happens
    when you do drastic things to the worksheet,
    Regards,
    "Nydia" <anonymous@discussions.microsoft.com> wrote in message
    news:0f0401c54cf5$1a4a69b0$a401280a@phx.gbl...
    >I have a database and i have a command button on the form.
    > on click this opens a report for the specific client on
    > the screen. it was working fine, but now doesn't work
    > after i did a compact and repair. here is the visual
    > basics code
    >
    > Private Sub cmdBillingSheet_Click()
    > On Error GoTo Err_cmdBillingSheet_Click
    >
    > Dim stDocName As String
    > Dim stlinkcriteria As String
    >
    > stDocName = "rptBillingSheet"
    >
    > stlinkcriteria = "[clientid]=" & Me![ClientID]
    > DoCmd.OpenReport stDocName, acPreview, , stlinkcriteria
    >
    > Exit_cmdBillingSheet_Click:
    > Exit Sub
    >
    > Err_cmdBillingSheet_Click:
    > MsgBox Err.Description
    > Resume Exit_cmdBillingSheet_Click
    >
    > End Sub
    >
    >
    > what's wrong with it? any help is greatly appreciated




+ 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.6.0 RC 1