> I have two version of "main" Form (Form1... Form2) with Combo Box (Combo35).
> From this form I open another form where Default Value in one Field (Text
> Box) must be value from Combo35 in Form1 or Form2.
> How to detect which form is open and use value from Combo35 in opened form
> to default value in Text Box in second form?
> Thanks!
I try some code in On Current properties, but without success...
What's wrong?
If CurrentProject.AllForms("Form1").IsLoaded Then
Me.txtLogIn.DefaultValue = Chr$(34) & Me.[Forms]![Form 1]![Combo35] &
Chr$(34)
If CurrentProject.AllForms("Form2").IsLoaded Then
Me.txtLogIn.DefaultValue = Chr$(34) & Me.[Forms]![Form 2]![Combo35] &
Chr$(34)
Else
....
End If
End If
Thanks!
> Try
>
[quoted text clipped - 8 lines]
> > to default value in Text Box in second form?
> > Thanks!
Ofer Cohen - 07 Dec 2007 08:08 GMT
Sorry for the delay,
In the criteria you used "Form1" and in the reference to the combo you used
"Form 1", with space between the name and number.

Signature
Good Luck
BS"D
> I try some code in On Current properties, but without success...
> What's wrong?
[quoted text clipped - 26 lines]
> > > to default value in Text Box in second form?
> > > Thanks!