comparing two user-defined columns

Z

Zubin Desai

Hi I posted this question yesterday but didn't get many
responses. What I want to do is have a user pick which
two columns to compare in a query.

I have a table with From and To fields. In a form, if the
user picks "Smirnoff 80" as one column and "Jose Cuervo"
as the 2nd column, this is stored in the From and To
fields, respectively. The query needs to compare the two
columns (from a different table with 16 columns) with
field names as "Smirnoff 80" and "Tequila". Please help!
I am stuck on the query part, not having the user input
stored in the From To table.

I am not an expert in Access as I am only a summer
intern. But I have written one database and am fairly
familiar with the program. Thanks!
 
D

Douglas J. Steele

Sounds as though your database hasn't been properly normalized: having
information stored in the name of the field isn't the way to do it.

If you need to be able to change what columns are used in a query, you're
going to have to create the SQL statement dynamically.
 

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