Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #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
  #2   Report Post  
Alan
 
Posts: n/a
Default

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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trace Dependents and Precedents not working Manish Excel Worksheet Functions 0 April 11th 05 09:39 PM
Drop-down boxes stopped working Dave Excel Discussion (Misc queries) 1 April 4th 05 06:13 PM
Colour row that you are working on. Pank Mehta Excel Discussion (Misc queries) 4 March 29th 05 08:15 AM
EU Working Time Directive Trucker M Excel Discussion (Misc queries) 0 March 5th 05 09:15 PM
how do I adjust working calendar (6 day work week) in excel that . Hatem Excel Worksheet Functions 1 January 25th 05 12:04 PM


All times are GMT +1. The time now is 02:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"