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

IF AND Statement

Status
Not open for further replies.

Noah114

Technical User
Mar 31, 2005
59
US
Is there a statement in access similiar to the IF/AND statement in Excel? I need to know, if days is > 30 and qty = 4,
 
Have a look at the IIf function.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Code:
If days > 30 AND qty = 4 Then
   X = 99
Else
   X = 0
End If
or the Immediate If
Code:
X = IIf(days > 30 AND qty = 4, 99, 0)
 
Noah, are you writing an Access query? Or are you in VBA code (in a module or behind a form/report)?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top