Dropdown value selected in previous form should be populated in next form (1 Viewer)

pinky

Registered User.
Local time
Yesterday, 22:53
Joined
Jul 6, 2009
Messages
29
Can anyone help for writing code for populating the drop-down value from one form to another.
For Text box I did this:

Private Sub Txt1_AfterUpdate()
Me.Txt1.DefaultValue = "" & Me.Txt1 & ""
End Sub


Private Sub Txt1_GotFocus()
Me.Txt1 = Me.Txt1.DefaultValue
End Sub


But I am not able to do for Drop down. Can anyone help me?

Thanks,
Pinky
 

vbaInet

AWF VIP
Local time
Today, 06:53
Joined
Jan 22, 2010
Messages
26,374
What's the reasoning behind using the DefaultValue property?
 

pinky

Registered User.
Local time
Yesterday, 22:53
Joined
Jul 6, 2009
Messages
29
I am new to access and found the code similar and it worked. Its just an example...I want to populate drop down values when selected in first record to populate in the second form onwards until they change.
Ex: It they select "car" for "Type of car" field for an Id=1, When they enter second Id, the drop down for Type of car should be auto populated with value "car" . How can we do this?? Can you please help me out.
 

Users who are viewing this thread

Top Bottom