comparing two user-defined columns

  • Thread starter Thread starter Zubin Desai
  • Start date Start date
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!
 
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.
 
Back
Top