View Single Post
  #1   Report Post  
Nydia
 
Posts: n/a
Default 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