Is it possible to have an if then statement in the control source of a text box. For example:
=(If([Text56]=" ", " ", (DLookUp("[Name]","OptionGroupTable","[OptionGroupNumber] =" & [Text56]))))
Right now when I do this it asks me to define If.
The reason I am doing this (in case there is another way and I am not thinking of it) is that in some cases the [Text56] field is blank. When it is blank the Dlookup function returns an error. What I want it to do is if there is a value in [Text56] to use the Dlookup funtion and if it is null leave it blank.
Thanks in advance!
Gretchen
=(If([Text56]=" ", " ", (DLookUp("[Name]","OptionGroupTable","[OptionGroupNumber] =" & [Text56]))))
Right now when I do this it asks me to define If.
The reason I am doing this (in case there is another way and I am not thinking of it) is that in some cases the [Text56] field is blank. When it is blank the Dlookup function returns an error. What I want it to do is if there is a value in [Text56] to use the Dlookup funtion and if it is null leave it blank.
Thanks in advance!
Gretchen