IF AND Statements

L

Larisa

Is it possible to have an IF and AND statements at the same time in the same
cell?

Thank you!
Larisa
 
B

Bob Barnes

You mean code in a module?? ..a Calculated Field in a query...

Private Sub GoEntry()
If (Not IsNull(txtDate) And Not IsNull(TheShift) _
And Not IsNull(DayOfWeek) And Not IsNull(List2) _
And Not IsNull(List5)) Then
cmdDataEntry.Enabled = True
Else
cmdDataEntry.Enabled = False
End If
End Sub
 
L

Larisa

Bob is there a formula that I can use without using VBA? (I'm still in the
process of learning VBA)

Thank you!
 
B

Bob Barnes

If you're familiar with IIF, you can nest IIF(s) within a statement for a
Calculated Field.

Does that Help?
 
Top