Forms

  • Thread starter Thread starter Hubbymax
  • Start date Start date
H

Hubbymax

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.
 
hi,
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 <--
 
hi,
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?
 
Back
Top