Random Query?

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!
 
J

John Vinson

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.
 

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