Generate error message if wrong button is clicked

S

Steve S

I have a form that contains buttons to select months (Jan-Dec) to print
budget vs actual accounting reports. The reports are based on linked views
in a SQL database. There is a text field on the form that updates to the
'month' of the requested report whenever the SQL view is updated. What I'm
trying to accomplish is, if a button is clicked that does not correspond with
the text field that the SQL view is set to, I want to generate an error
message that an incorrect month was selected. Any help would be greatly
appreciated.
Thanks in advance,
 
D

Dale Fye

Steve,

What does the code look like in the click event of the various month command
buttons? It would seem to me that if you have a control that identifies the
month that is displayed, they you could use that control to specify the
WhereCondition when opening the report, rather than having a separate report
for each month. This way, you would only need a single OpenReport button.

Dale
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top