"Enter a value in the field" error

CTQE

Registered User.
Local time
Today, 02:06
Joined
Feb 27, 2008
Messages
48
Hello All,

I have a strange error that I can not figure out what is triggereing it.
I have a subform with 2 required fields.
As I am typing data into the first field an error message window prompts specifying the data in the second field is required.

Why is this premature error coming up.
FYI, if I begin to fill out data in the 2nd field prior to the 1st field, as I'm typing the data I receive the same error message.
 
Make sure that your parent form does not include the subform table in its record source and that the subform doesn't include the parent form's table(s) in its record source.
 
Thanks for your quick response, but no neither form reference each other in the Record Source.
 
Thanks for your quick response, but no neither form reference each other in the Record Source.

So what is the record source of the parent form and what is the record source of the subform?

Are you using tables, queries, or a SQL Statement in each of the form's record source property?
 
The parent Record source is: tbl_SignIn
The subform Record source is: tbl_SignOut subform

The forms are table based.

I have attached the database for your review.
 

Attachments

Okay, a quick question -

Why do you have this code in the frm_SignOut form's Load event?
Code:
Private Sub Form_Load()
DoCmd.OpenForm "frm_SignOut", acFormAdd 'acNormal
DoCmd.GoToRecord acDataForm, "frm_SignOut", acNewRec
End Sub

It makes no sense to run the DoCmd.OpenForm for the same form for which the Load event is firing.

Second, go into the tbl_SignOut and change the Required property of SignOut to NO instead of YES. This is what is causing the error message to pop up. Handle the validation in the subform's BEFORE UPDATE event instead - so you can cancel the update or not save if it isn't filled in.

And the SAVE button on the main form is irrelevant. It does nothing. It isn't going to to anything. That will only save changes on the main form (once you move to the main form to click the button the subform is going to save immediately anyway) and there is no point to it on the main form as there is nothing to save as no controls are editable.
 
You are amazing!
Thanks for your help Bob, I really appreciate your input & expertise.
 

Users who are viewing this thread

Back
Top Bottom