Aug 2, 2006 #1 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,
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,
Aug 2, 2006 #2 PHV MIS Nov 8, 2002 53,708 FR 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 Upvote 0 Downvote
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
Aug 2, 2006 #3 Golom Programmer Sep 1, 2003 5,595 CA 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) Upvote 0 Downvote
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)
Aug 2, 2006 #4 rjoubert Programmer Oct 2, 2003 1,843 US Noah, are you writing an Access query? Or are you in VBA code (in a module or behind a form/report)? Upvote 0 Downvote