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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display fields on report based on entries in a select query

Status
Not open for further replies.

torf66

Programmer
Jun 10, 2003
43
0
0
US
I have five fields example field names are ActiveCombination, Combination1, Combination2, Combination3, Combination4, Combination5.
I want the user to Enter a combination and then display only that combination on the report. For example I enter
at the prompt 'Enter Active Combination' and I enter a 2. Then I only want to see entries on the report where the Active Combination is a 2 and display only the field Combination2 on the report, how can I do that in a select query?
 
Hi

Easiest way is probably:

Make your select query include all five combination columns

make your reposrt show all five combination columns

run the report from the form, leaving the form open

in the onformat event of the detail section of the report (assuming this is where teh controls for the combinations are), put code to hide the combinations you do not want to see eg something like

Select Case Forms!MyForm!cboCombination
case 1
combination1.visible = true
combination2.visible = False
...etc
Case 2
combination1.visible = False
combination2.visible = True
...etc
Case 3 ...etc
End Select


Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top