If Function in Query

Launcher

New Member
Joined
Mar 31, 2004
Messages
35
I have three tables CUSTOMER, MATERIALS and ORDER. The first two contain info about customers and materials(these are chemicals). On the MATERIALS table there are a list of tolerances e.g. top temperature and bottom temperature. In the ORDER table I can choose the customer and the material then I list the actual temperature etc. I want to create a query which will produce a Pass or Fail for each tolerance based on comparing the actuals to the top and bottom amounts. I could do this function in Excel using IF but am having problems in Access. I would also liek to produce a certificate at the end (a report based on the query) which would have Pass on it if all of the individual tolerances have passed.

Any help greatly appreciated. Thanks in advance.

Note: Not used VBA before so expressions and where to put them would be appreciated.

Launcher
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,300
Office Version
  1. 365
Platform
  1. Windows
Launcher

If you can do it with IF in Excel then you should be able to do it with Iif in Access.

Perhaps something like this.

PassFail:Iif([ActualTemp] Between [TopTemp] And [BtmTemp], "Pass", "Fail"
 

Forum statistics

Threads
1,136,650
Messages
5,677,000
Members
419,667
Latest member
MegEri

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top