Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change 1 colume in report which depend on usr input in prompt?

Status
Not open for further replies.

TracyYu

Technical User
Feb 9, 2004
17
US
I'm pretty new with MS Access, I'm having difficulty on producing this report, hope someone here can enlighten me. Thanks in advance. :)


When user wants a report, I prompt the user for their choice: A, B, C, or D.

If the user choose A, B, or C, the report has the same column titles (e.g. col_M, col_N, col_O, etc.).

If the user's choice is D, then 1 column in the report is different (e.g. col_M, col_E, col_O, etc.)

How can I do that? I know a little bit of C/C++, so I was thinking maybe some if...else... statement? If that's what I need, how and where should I have the statement?
 
You could write some VBA to suppress the one column, but it mightbe simpler to just have another copy of the report with(out) the data

Bastien

Any one have a techie job in Toronto, I need to work...being laid off sucks!
 
Bastien,

thank you for your reply. Can go into more detail as how when user choose the 4th choice (D), the copy of the report will be evoked? Or, how the VBA should be like?


and sorry that I don't know any one who can offer you a job. I'm at New Jersey. Good luck.

Tracy
 
It depends on how you are offering the choice to the user...drop down? buttons? radio buttons?

The easiest way to do this is to first create the report and use buttons to represent the choices (a-d)...when thats working, change up to what ever format you are using and with an if/then point to the code the button created

The wizards help with most of this coding and its very quick to do

Bastien

Any one have a techie job in Toronto, I need to work...being laid off sucks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top