Force data entry

Danny

Registered User.
Local time
Today, 12:52
Joined
Jul 31, 2002
Messages
157
Greetings,
I have a main form called HouseHold and a subform called Applicants. For every HouseHold there can be more than one applicant (one-to-many relation). I’m trying to force users to first enter HouseHold information before they enter applicant’s info. If they try, then a Message should come up saying like “You must first enter HouseHold’s info…” How can this be accomplished?

Thank you in advance,
DD
 
You can run a test in the subform's On Enter event. Test to see if data's there and if not give the message and set the focus elsewhere.
 
How about keeping the Applicant subform disabled until the user has entered or selected valid HouseHold info? Just place code into the HouseHold info AfterUpdate event to run a check.
 
Hi: Not sure if this will help, but here is a snippet of code that I used to check to see if items were selected in a multi-select list control. I only proceeded with my process if at least one item had been selected from the list. You could easily change the sub so that it checks whether or not there is data in your field (instead of my code that checks the list )

With Me!FrmNewList!Parts
If .ItemsSelected.Count > 0 Then
' Any selection?
' Place your regular processing code here
Else
MsgBox "You haven't selected an entry in the " _
& "list box."
End If
End With
 

Users who are viewing this thread

Back
Top Bottom