Avoiding Error message (3314) when creating a new record

V

Vicki

I created a database in which a new Client ID (primary key) is created (via
AutoNumber) when a new record is created. When I click "new record", a blank
form pops up. But once I start typing data onto the form, the following
message appears "The field "Clients.ClientID" cannot contain a null value
because the required property for this field is set to true. Enter a value in
this field."

I click OK & it allows me to enter data onto the form. A Client ID doesn't
show up in the form until after I close & re-open the form. Is there a way to
have the Client ID show up once I start entering data on the form, so I can
avoid the above error message?
 
J

Jerry Whittle

Questions:

When you click on New Record, is this on a form or at the table level?

In a form, is the blank form a completely different form or the form where
you click New Record?

Is the New Record button the one of the "VCR" buttons on the lower left of
the form or a custom button?

Any code behind the form on things like the On Open event?

Any subforms or subreports on the form?
 
V

Vicki

Hi Jerry,

I wrote my answers below your questions:

Jerry Whittle said:
Questions:

When you click on New Record, is this on a form or at the table level?

It's on a form.
In a form, is the blank form a completely different form or the form where
you click New Record?

It's the latter.
Is the New Record button the one of the "VCR" buttons on the lower left of
the form or a custom button?

Both are present - and I get the same error message using either buttons.
Any code behind the form on things like the On Open event?
No.

Any subforms or subreports on the form?

Yes. The form has 9 tabs, and on each tab there is a subform.

Thanks,
Vicki
 
J

Jerry Whittle

I'll put money on it being a problem with one of the subforms. Probably not
linked properly.

Put the form in design view. Go to the first subform and right click on it.
Bring up the properties and go to the Data tab. See what Link Master Field
and Link Child Field say. If you have trouble finding these two, click off of
the subform to the main form, then click once back on the subform. There
almost certainly should be links between the two tables. If not, that's the
problem.

Repeat for each of the subforms.
 
V

Vicki

I just checked all the subforms & the Link Master Field & Link Child Field
all say "ClientID"

-Vicki
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top