Forms again....

H

Hubbymax

I have changed the forms so there is now just the main form and 1
subform. I still have the 3 fields in the main form that need to be
transfered the the subform as they are entered in the main form
( placed in the 3 fields on the subform when sub form is entered). THe
must then stay the same as new detail records are entered using the
sub form. The only time the 3 fields in the sub form should chasnge is
when a new main record is created using the main form and those fields
are changed. I have included the original post and the one answer I
got.

Main form fields

ReqFilledDate
StoresReqDate
Cust

Subform fields

ReqFilledDate
StoresReqDate
Cust
Hubbymax said:
I have a main form with two sub forms. The main form info is for
viewing only and is filled in by a drop box. There are 3 fields enterd
by the user on the 1st sub form that I want transfered to to fields on
the 2nd sub for. Once transfered they should stay the same as new
records are being entered until new data is entered on sub form 1.
Only the info on sub form 2 is placed in the table.

You may use the Before Insert event of sub form 2:

Private Sub Form_BeforeInsert()

Me![field] = Me.Parent!subForm1Control.Form![field]

End Sub

mfG
--> stefan <--



I tried this but no results. I set the property of Reqsubform2 as
follows

Private Sub Form_BeforeInsert(Cancel As Integer)
Me![Cust] = Me.Parent!Req4subFORMCONTROL.Form![Cust]
Me![ReqFilledDate] = Me.Parent!Req4subFORMCONTROL.Form.
[ReqFilledDate]
Me![StoresReqNo] = Me.Parent!Req4subFORMCONTROL.Form.
[StoresReqNo]
End Sub


The 1st sub form does not have a number, it's just req4subform. Can I
do 3 fields like this? Should this code be for the form itself or
entered in each field property seperatly?
 

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

Similar Threads

Forms PLEASE HELP 9
Forms 2
Split form 0
Populate main form from subform record 0
Forms offline? 1
Is this possible? 0
Monthly Inventory Report 18
Problems with code 11

Top