Get data from main form?

  • Thread starter Thread starter G Lam
  • Start date Start date
G

G Lam

Hi, I had a data entry form with subform.
The main form had 4 fields:
OrdId, BinId, PID and Date
The subForm had 4 fields:
OrdSubID, BinSubId, InvID and NbrOfItem.
The linking field was OrdId. When user entered data, the OrdId data would go
into the subform's ORdSubID field. I also when the BinSubID in the subform
got the data from the BinId in the main form too. I wrote a line of code
like this:
In the Enevt tab of InvID field (SubForm) property :
Private Sub InvID_GotFocus()
BinSubId = [PMain].BinId
End Sub
I was thinking that when the InvId field got focus, A2K got the data from
PMain form's BinId field and inserted that data to the BinSubId in the
subform.
But it did not work. Please help.

Thank you
Gary
 
I also when the BinSubID in the subform
got the data from the BinId in the main form too.

Make BOTH fields part of the Master and Child Link Fields:

Master - OrdID;BinID
Child - OrdID;BinSubID
 
Back
Top