passing value from a form to another form

  • Thread starter Thread starter Rani
  • Start date Start date
R

Rani

HI guys

I have a form (Choze_FRM) containing a combo box (CustNameCombo) I defined
an On Not In List event that opens another form (AddCustFRM) first field on
that form is CustName,
I am using an on get focus event to pass the value entered on the combo box
to the new field.
I'm using :
Private Sub CustName_GotFocus()
CustName = Forms![Choze_Frm]![CustNameCombo]
End Sub.

and I am not getting anything.

can you guys tell me what am I doing wrong ?
 
Rani,

In the OnNotInlist event put before opening the second form, the
instruction:
Me.Tag = NewData
For the second form use maybe rahter OnOpen (for me OnFocus does not
happen!!?!),
then put there:
Text0.Value=Forms!FrmTest1!Tag

You must still handle the result of the first form with "Response = ..."
(maybe depending on the users choice in the second form).

HTH

+ Jan Pit +
Botswana
 
thanks.

Jan Pit said:
Rani,

In the OnNotInlist event put before opening the second form, the
instruction:
Me.Tag = NewData
For the second form use maybe rahter OnOpen (for me OnFocus does not
happen!!?!),
then put there:
Text0.Value=Forms!FrmTest1!Tag

You must still handle the result of the first form with "Response = ..."
(maybe depending on the users choice in the second form).

HTH

+ Jan Pit +
Botswana


Rani said:
HI guys

I have a form (Choze_FRM) containing a combo box (CustNameCombo) I defined
an On Not In List event that opens another form (AddCustFRM) first field on
that form is CustName,
I am using an on get focus event to pass the value entered on the combo box
to the new field.
I'm using :
Private Sub CustName_GotFocus()
CustName = Forms![Choze_Frm]![CustNameCombo]
End Sub.

and I am not getting anything.

can you guys tell me what am I doing wrong ?
 
Back
Top