Reputation: 43
I Have 2 Forms (Form1,Form2)
When I pass parameter from Form1 to Form2 it will pass the ID not the value
Code in Form1
DoCmd.OpenForm "Form2", acNormal, , , , acWindowNormal, Me.Combo5.Value
Code in Form2 (Load Event)
Me.Text0 = (Me.OpenArgs)
Combo5
is the ID to retrieve other values from a table(ID , username, password)
How can I retrieve the username?
Upvotes: 0
Views: 134
Reputation: 976
If your datasource for the combobox has all three fields of the table you can access it via the Column property http://msdn.microsoft.com/en-us/library/office/ff192660(v=office.15).aspx
Me!Combo5.Column(1)
Otherwise you will have to do a DLookup() http://msdn.microsoft.com/en-us/library/office/bb148913(v=office.12).aspx
Upvotes: 1