passing value into another form

AngelicaMiranda

Registered User.
Local time
Today, 16:56
Joined
Nov 30, 2011
Messages
20
i need to pass the value from a combo box to another form(textbox)
I already try

DoCmd.OpenForm "SecondFormName", , , "FieldName = " & Me.ControlName

it opens the another form but it does not automatically display the combo box value in my 2ndform...

would someone help me?

THANKS in advance
 
The code you have presented is using a Where condition to to Open the form filtered to the condition "FieldName = " & Me.ControlName.

If you want to pass a value to the form being opened you need the OpenArgs portion of the OpenForm method to pass information or instructions from the calling form to the form being opened.

The OpenArgs can then be testes in the On Load event of the form being opened to determine how it should behave under different circumstances.
 

Users who are viewing this thread

Back
Top Bottom