default values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with a command button that launches another form, form B. I
have succesfully filtered the selection so I only select form B for clients
that have the same company as selected in the original form. However, I can
not figure out how to set the default value of the company to the value in
the original form.

What i want to do is click the button and go to a blank form that has the
company name filled out with the same company name as the form I came from.
How do i do this?
 
Russ said:
I have a form with a command button that launches another form, form B. I
have succesfully filtered the selection so I only select form B for clients
that have the same company as selected in the original form. However, I can
not figure out how to set the default value of the company to the value in
the original form.

What i want to do is click the button and go to a blank form that has the
company name filled out with the same company name as the form I came from.
How do i do this?

In the "On Click" event of the button:

DoCmd.OpenForm "BlankFormName", acNormal, , , , , Me.CompanyName



In the "On Open" event of the blank form :

If Not IsNull(Me.OpenArgs) Then
Me.CompanyName= Me.OpenArgs
End If
 
Back
Top