Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP who is the query condition whiz

Status
Not open for further replies.

AstroTek

Programmer
Apr 27, 2004
21
US
On one table I have four fields bpentid+bproleid+prodbrnid to get the proper billing number(inv) they have relationships to fields on another table.

example: If bproleid=mb then bpentid =inv

If bproleid=DI then bpentid+bproleid+prodbrnid donot have to equalto the billing. The record should match what is equal to the record on the table.

If bproleid=wh then bpentid+bproleid+prodbrnid donot have to equalto the billing. The record should match what is equal to the record on the table.

these are all the bproleid variable conditions Wh DI MB

 
What are the four fields in the first table? What is the key to the second table? What field(s) are you trying to get from the second table?

traingamer
 
the variable condition are:
bpentid= x
bproleid=y
prodbrnd=z
parentbilling=a
billing=b
X,y,z and b are on the same table
A is on the another table
each table has a primary code generated by access
If y=mb
x+y+z=b or x and b
if y=wh
x+y+z=a
if y=DI
x+y+z=a

A has to be looked up on a table to find b
each field
x is an eight digit number
y is a two digit alpha
z is a two digit alpha

I am trying to put the conditions into one two or three queries.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top