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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if, then, type thing

Status
Not open for further replies.

stc

Technical User
Aug 23, 2001
25
GB
Here is what I want to do:

In my database of products each individual product has a specific stock level, below which the product has a shortage. From the main record page, I want to have a button which previews a report which lists all products there is a shortage of. I guess I need to make a query, but can't figure out how to make Access see if something is short or not. I suppose the logic is something like: if product total (which is generated from a query) is less than product shortage level (as defined in a table) then that product is short, and should be shown on the report.

Does that make any sense?!
 
The Query would look something like this:

SELECT table.[Product Stock], table.[Product Shortage] FROM <table> WHERE [Product Stock] < [Product Shortage]

Use this Query as the source of data for your report. This Query assumes that Product Stock and Product Shortage are in the same table. If they are in separate tables, you will need to do a JOIN on the key field in the Query.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top