How to require entry in a field on a subform?

lkwander

New member
Local time
Today, 14:30
Joined
Feb 14, 2005
Messages
5
I haven't been able to figure out the code to require entry (for a new record) in a field on a subform - anyone can help with this?

The situation is a contacts database, and each new contact should have a (or multiple) Person Roles entered as well, which is their relationship to the organization.
 
Lets say that the control on the form is a combobox (because you did not specify), in the Form_BeforeUpdate Event try entering something like this:
if isnull(cbo) then
msgbox "Missing Entry"
cbo.setfocus
cancel=true
Exit Sub
end if
 
Search here for topics on CanClose
 

Users who are viewing this thread

Back
Top Bottom