Accessosaurusrex
Registered User.
- Local time
- Today, 08:48
- Joined
- Oct 18, 2010
- Messages
- 28
I have a table with 14 fields. I am looking to pull up records based first on a user input to match one field and then all records that meet a criteria of three other potential fields.
My code is as follows:
SELECT Bcone.Job, Bcone.ID, Bcone.Customer, Bcone.Desc, Bcone.Code, Bcone.Element, Bcone.Mark, Bcone.Weld, Bcone.RorRR, Bcone.Root, Bcone.Dim, Bcone.Grd, Bcone.Rad, Bcone.Loc, Bcone.Notes, Bcone.WDate, Bcone.WTime, Bcone.Re, Bcone.ClrDate, Bcone.RX, Bcone.NS
FROM Bcone
WHERE (((Bcone.Job)=[Enter Job]) AND ((Bcone.Re)="-1")) OR (((Bcone.RX)="-1")) OR (((Bcone.NS)="-1"))
ORDER BY Bcone.Job, Bcone.Code, Bcone.Element, Bcone.Mark, Bcone.Weld;
This fails me as I get all "jobs" where any of the or criteria are functioning. I simply want any of the records with the job input from the user that meet any of the other three criteria to return.
Thanks for any assistance
My code is as follows:
SELECT Bcone.Job, Bcone.ID, Bcone.Customer, Bcone.Desc, Bcone.Code, Bcone.Element, Bcone.Mark, Bcone.Weld, Bcone.RorRR, Bcone.Root, Bcone.Dim, Bcone.Grd, Bcone.Rad, Bcone.Loc, Bcone.Notes, Bcone.WDate, Bcone.WTime, Bcone.Re, Bcone.ClrDate, Bcone.RX, Bcone.NS
FROM Bcone
WHERE (((Bcone.Job)=[Enter Job]) AND ((Bcone.Re)="-1")) OR (((Bcone.RX)="-1")) OR (((Bcone.NS)="-1"))
ORDER BY Bcone.Job, Bcone.Code, Bcone.Element, Bcone.Mark, Bcone.Weld;
This fails me as I get all "jobs" where any of the or criteria are functioning. I simply want any of the records with the job input from the user that meet any of the other three criteria to return.
Thanks for any assistance