I have the following code for an on click event:
Private Sub ViewAvail_Click()
On Error GoTo Err_ViewAvail_Click
Dim stDocName As String
DoCmd.CloseForm "MainMenu"
stDocName = "InventoryAvail"
DoCmd.OpenReport stDocName, acPreview
Exit_ViewAvail_Click:
Exit Sub
I get a a "compile error, method or datamember not found" when button is clicked with the event name highlighted in yellow and the CloseForm highlighted in blue.
If you can help me with this maybe you can also validate my basis for doing this. I have been using macros for the on click events which work fine for me and those with full security access, however when those with only read and execute rights click they get an error "macro not found" or another message about macro new. When I use the above VB without the DoCmd the on click works for all users. I am converting all of the macros to VB to avoid the security issue- does that make sense?
I am a beginner and this forum's FAQ and posting is awesome; thanks to all who have/are helping!!
Private Sub ViewAvail_Click()
On Error GoTo Err_ViewAvail_Click
Dim stDocName As String
DoCmd.CloseForm "MainMenu"
stDocName = "InventoryAvail"
DoCmd.OpenReport stDocName, acPreview
Exit_ViewAvail_Click:
Exit Sub
I get a a "compile error, method or datamember not found" when button is clicked with the event name highlighted in yellow and the CloseForm highlighted in blue.
If you can help me with this maybe you can also validate my basis for doing this. I have been using macros for the on click events which work fine for me and those with full security access, however when those with only read and execute rights click they get an error "macro not found" or another message about macro new. When I use the above VB without the DoCmd the on click works for all users. I am converting all of the macros to VB to avoid the security issue- does that make sense?
I am a beginner and this forum's FAQ and posting is awesome; thanks to all who have/are helping!!