message box question

J

Jessica

Hi

Is it possible when opening a report to have a message box pop up asking
the user to enter either A or X and placing the result in a field of a
report?


Thanks
Jess
 
R

Rick Brandt

Jessica said:
Hi

Is it possible when opening a report to have a message box pop up
asking the user to enter either A or X and placing the result in a
field of a report?

Just use a TextBox with a ControlSource of...

[Please Enter 'X' or 'A']
 
A

Arvin Meyer

Yes you can pop up the message box, but no you can't enter any data. What
you can do is to use a form to enter the data, or even an input box
function. A form is far more elegant.

What I'd do is build the form and use it to open the report, passing the
data by setting textboxes on the report equal to the value on the form. In
the report's On Open event, check whether the form is open and the data is
filled in. If it is, finish opening the report. If it isn't, opena msgbox
telling the user to fill in the form, open the form and cancel the report's
opening.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
J

Jessica

Thanks guys it worked great. I would like to take it one step further
though. I have the input box display when the form is opened and would
like it to ask the user to enter either 1 or 2. If 1 is entered to input
an A on the report, if 2 is entered then input an X on the report. Also
is there a way to restrict the user from entering anything other than 1
or 2?

TIA,
Jess
 
Top