Hello all! I have combo boxes on my form that get values from a lookup wizard. What is the correct code to use? I am assuming something like NotInList. Can someone help me if they have time and show me the correct way to check if nothing is entered in the combobox? I am using If then statements.
I thought the code would look something like this, but i am wrong:
If me![cboSwingID].value = false then
msgbox "Please choose a Swing Type"
me.cboSwingID.setfocus
Exit Sub
elseif me![cboUnitDescriptionID].value = false then
msgbox "Please Choose a Unit Description"
me.cboUnitDescriptionID.setfocus
exit sub
else
docmd.gotorecord , , acNewRec
end if
I thought the code would look something like this, but i am wrong:
If me![cboSwingID].value = false then
msgbox "Please choose a Swing Type"
me.cboSwingID.setfocus
Exit Sub
elseif me![cboUnitDescriptionID].value = false then
msgbox "Please Choose a Unit Description"
me.cboUnitDescriptionID.setfocus
exit sub
else
docmd.gotorecord , , acNewRec
end if