Morning everyone,
If this post is in the wrong form, please forgive me. Also my VB coding is very limited.
I am working on a Access 2007 ADP connected to a Ms-Sql database. My current issue is with displaying a report on the screen that uses a query(stored procedure in the ADP) with a prompt in it. Trying to prompt the user via two different command buttons, one to inquire by asset number and the second command button (both from a menu) to enter a pair of dates, to be able to review what occured when a person was off for a few days, but in both cases want to keep the data read only. When I attempt to create an event procedure (on click) and use the following
DoCmd.OpenReport "reportname", AcViewPreview
When this is done, a message is given that the code is incorrect and no matter what options I add it still fails.
If however, I do the following:
DoCmd.OpenReport "reportname"
Then it wants to print the report rather than viewing on screen.
A bit confused and looking for guidenance and direction on how to approach this problem. Any help would be appreciated.
Regards,
Terry
If this post is in the wrong form, please forgive me. Also my VB coding is very limited.
I am working on a Access 2007 ADP connected to a Ms-Sql database. My current issue is with displaying a report on the screen that uses a query(stored procedure in the ADP) with a prompt in it. Trying to prompt the user via two different command buttons, one to inquire by asset number and the second command button (both from a menu) to enter a pair of dates, to be able to review what occured when a person was off for a few days, but in both cases want to keep the data read only. When I attempt to create an event procedure (on click) and use the following
DoCmd.OpenReport "reportname", AcViewPreview
When this is done, a message is given that the code is incorrect and no matter what options I add it still fails.
If however, I do the following:
DoCmd.OpenReport "reportname"
Then it wants to print the report rather than viewing on screen.
A bit confused and looking for guidenance and direction on how to approach this problem. Any help would be appreciated.
Regards,
Terry