Send field from Form to Query

R

Rick

I am currently using an option group on a form to allow
users to pick the fields that they would like to see
displayed in a report. I use the "Choose" function in the
underlying query to select the correct field from each
option group. I would like to use combo boxes instead of
option groups and radio buttons. How would I send the
value of a combo box to a query so that the values of a
particular field are displayed in the results (i.e.
if "Address" is selected from the combo box, then the
values in the [Address] field will be displayed in the
query results). Thanks,
-Rick
 
D

Duane Hookom

Your combo box would require a two column row source like:
1; Address;2; City;3; Zip Code;...

Then your query can create columns like
Field1: Choose(Forms!frmA!cboField1, [coAddress], [coCity], [coZipCode],...)
 

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