sml41
asked on
report
I use VB6 to print a report directly from access 97,. it works ok to print, but if i choose cancel button in the dialog box (parameter query box to enter date or id...etc) this produces a run time error 2501 and then exits
the program. how can i solve this please from BV6.
the program. how can i solve this please from BV6.
ASKER
hi,
this is my code, i experemented as u suggested, i could not succeed, can u tell me where i check for the error please in my code.
thanks
Private Sub bookingBetweenTwodates_Cli ck()
Set Access = GetObject(App.Path & "\MyDb.mdb")
Access.DoCmd.OpenReport ("MyAccessReport")
Set Access = Nothing
End Sub
this is my code, i experemented as u suggested, i could not succeed, can u tell me where i check for the error please in my code.
thanks
Private Sub bookingBetweenTwodates_Cli
Set Access = GetObject(App.Path & "\MyDb.mdb")
Access.DoCmd.OpenReport ("MyAccessReport")
Set Access = Nothing
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks I visited your website, it's cool.
Glad you liked it. Did you have your speakers on when you visited? :-)
M
M
ASKER
yes i did, & i agree with you
M