Saving record

L

Lexi

Newbie question for you...please excuse my ignorance if
this is a silly question

I have a subform which has 4 fields in it. One of the
fields is an autonumber; two of the fields have default
values in; the fourth field updates with a value from the
main form.

The problem I am having is the the record (from the
subform) is not saving. Is this because no data has been
entered by the user? Is there a way around this?

Please advise,
L
 
R

Rick Brandt

Lexi said:
Newbie question for you...please excuse my ignorance if
this is a silly question

I have a subform which has 4 fields in it. One of the
fields is an autonumber; two of the fields have default
values in; the fourth field updates with a value from the
main form.

The problem I am having is the the record (from the
subform) is not saving. Is this because no data has been
entered by the user? Is there a way around this?

Either the user or your code/macro must set a value for a record to be
created. Defaults alone will not create one. In code you could just set a
field or control equal to itself and that would do it.
 
L

Lexi

-----Original Message-----


Either the user or your code/macro must set a value for a record to be
created. Defaults alone will not create one. In code you could just set a
field or control equal to itself and that would do it.
I put the code me!attempt_date=me!attempt_date in the
Before_Update box (in Properties of the attempt_date
field). It does not work. Am I missing the point?
 
R

Rick Brandt

Lexi said:
I put the code me!attempt_date=me!attempt_date in the
Before_Update box (in Properties of the attempt_date
field). It does not work. Am I missing the point?

Yes. BeforeUpdate would only fire if you or the user had already made a
change in which case your code wouldn't be necessary. You have already
stated that this isn't being done so you need to select a different event.
 

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