MarkK
bit cruncher
- Local time
- Today, 00:42
- Joined
- Mar 17, 2004
- Messages
- 8,364
If the button click is not firing at all, then open the form in design view and look at the property sheet of the button on the 'Event' tab. Look for the On Click property, and make sure it is set to "[Event Procedure]" (without the quotes). That tells Access that button is supposed to raise events.
After that, check the routine name that is supposed to handle that click event. It should have a signature like this...
...and if you put a message box in that event and click the button, you should see the MsgBox as evidence that the click is actually handled in code...
Once that is confirmed, try to call the routine ExportToExcel. To do so you need to pass it a parameter, presumably txtReportType, a value in a textbox. I have not confirmed that this is true, but that was the name of the object in the code in your database.
Does that make sense? Do you see how each of those steps is essential in the chain of things that happen following the button click?
hope that helps,
Mark
After that, check the routine name that is supposed to handle that click event. It should have a signature like this...
Code:
Private Sub ButtonName_Click()
Code:
Private Sub cmdPrint_Click()
MsgBox "cmdPrint_Click executed successfully"
End Sub
Code:
Private Sub cmdPrint_Click()
ExportToExcel.ExportToExcel Me.txtReportType
End Sub
hope that helps,
Mark