Form not being created as a new record

I have a form which contains 3 subforms.  On the main form is a combobox field and the default value of the combobox field is:


The first thing a user does is attempt to make an entry in one of the subforms.  But because the user doesn't actually do anything with the main form (unless they select a different username from the combobox), they get an error because the main form record hasn't actually been created.  In other words it doesn't have a record number yet.

What I need to do it "trick" the main form into creating a record once the user focuses on the subform.

How can this be done?

Who is Participating?
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:
So the combobox controls the link to the subform?
So are you saying that the use "must" make an selection from the combobox first *then* be allowed to enter the subform...?

If so, then you can disable the subform when the main form opens, then only turn it on when a selection is made in the main form combobox.

- Set the Enabled propety of the *subform* to: NO

- Then put code like this on the combobox's after update event
    If me.YourCombobox<>"" or Not isnull(YourCombobox) then
    end if

Not sure if I am understanding this correctly, give it a try, ..and lets also see what other experts post.

Jeffrey CoachmanMIS LiasonCommented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.