Random Query?

  • Thread starter Thread starter Jenn
  • Start date Start date
J

Jenn

Access 97

I have three single digit feilds and would like to query
on only two of them however, the data is accross all three
fields.

Exsample:

Query for 34 would return:
340
304
430
034
043

Can someone please let me know how I can get this to work,
thanks!
 
Access 97

I have three single digit feilds and would like to query
on only two of them however, the data is accross all three
fields.

Exsample:

Query for 34 would return:
340
304
430
034
043

Can someone please let me know how I can get this to work,
thanks!

This suggests that your table isn't perfectly normalized - ordinarily
one would want each field to refer to a distinct attribute of the
record's entity!

However, you can use a qury like

SELECT * FROM yourtable
WHERE (Field1 = 4 OR Field2 = 4 OR Field3 = 4) AND (Field1 = 3 OR
Field2 = 3 OR Field3 = 3)

In the query grid, I don't think you can get the parenthesis nesting
this would require - open the SQL window and try this (changing to
your own fielnames of course).

For more flexibility, use [Enter first digit:] in place of 4 and
[Enter next digit:] in place of 3.
 
Back
Top