I am trying to create a VBA “if “statement with more than one condition. The following statement works fine:
If DLookup("SynthD", "DensityT") = 0 Then MsgBox "SyntheticDensity = 0, is this correct?"
BUT I want to include a second condition to evaluate “SynthPC”. Therefore, in order for the message box to appear, “SynthD” must = 0 and “SynthPC” must be >0.
I tried the following which does not work:
If DLookup("SynthD", "DensityT") = 0 and if DLookup("SynthPC","MasterTable") > 0
then MsgBox "SyntheticDensity = 0, is this correct?"
So what am I doing wrong?
Thanks,
Carmine