Saving record

  • Thread starter Thread starter Lexi
  • Start date Start date
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
 
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.
 
-----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?
 
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.
 
Back
Top