Form-Subform for Data Entry

froggiebeckie

Registered User.
Local time
Today, 16:59
Joined
Oct 11, 2002
Messages
104
Morning all!
I've done some searches, but can't find this one, so:

I need to enter multiple new records, all using the same "Week Ending" date. I would like to use a form for the data entry and enter the date only once.

With this in mind, I created a Single Form for the Week Ending field. I inserted a subform (Continuous Form) for data entry of all other fields, and referenced the Week Ending field in the main form.

The problem I'm having is that the date doesn't transfer to the subform for first record I enter. After that, the date shows in all the other records as it should.

Any idea what I've done wrong.

As always, thanks for taking the time to look at this.

BeckieO
 
I would have just had the [WeekEnding] control "carry over" the date to the next record. All you need to do is set the default value of the control to the current value in the BeforeUpdate event of the form.
 
Don't want to sound dense, but...

I can't get it to work.

I've probably missed a step, but I put"

=[Week Ending].[BeforeUpdate] in the Default Value section of the control's properties form. Nothing happens. Did I read the suggestion wrong?
 
You need to use the code builder button "..." on that event so it looks like the following:
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)

Me.[Week Ending].DefaultValue = Me.[Week Ending]

End Sub
 
Thanks so much.

Yup, that put me back on track--thanks again for taking the time to help me through brain dead moment.

BeckieO
 

Users who are viewing this thread

Back
Top Bottom