Link data to unbound textbox

wgma

Registered User.
Local time
Today, 05:56
Joined
Nov 19, 2007
Messages
72
I am using Access 2007.

I have a form that has a dropdown and an unbound textbox on it. I have created the code in the On_Change event to that when I select an item from the dropdown the textbox is populated with data from one of the dropdown columns.

Here is how I have it arranged.

Dropdown contains ID, Name, Address. The data for the dropdown is stored in a separate (lookup) table.

When the user selects a record the ID is stored in the main table.

When I navigate the through the records the name in the dropdown is displayed correctly but the textbox does not change. I understand that this is not going to work the way it is because the textbox is unbound.

What is the best way to get this to work? I can write code but what event do I put it under? Or, is there a way to get this to work without writing code?

this is my first Access application and I don't know all of the tricks.

Thanks.
 
Call the combo's AfterUpdate event from the Form's On Current event.
 
Stupid question, what is the code for doing that?

Private Sub Form_Current()
Me.cboShipper.AfterUpdate
End Sub
 
Thanks. I have tried many versions of that but none seem to compile.

call me.cboShipper_AfterUpdate
me.cboShipper_AfterUpdate
cboShipper_AfterUpdate
call cboShipper_AfterUpdate

I am really sorry about being so dense.
 
Well, I guess it would be good if your code was on the After Update event of the combo instead of the Change event :)
 
Duh! I could not see it to save my life. Thanks, I got it to work.

Don't go anywhere, I may have more questions later.

Thanks again.
 

Users who are viewing this thread

Back
Top Bottom