var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Changing Text box based on combo box selection
I have read many posts about this problem but for some reason I can't get it to work!
Anyway, I have 2 tables...
Table one (productdetails_tbl) contains information about the product in question, along with 2 fields about the person who completed the details sheet and their position within the company.
In this table, the field 'Completed By' which holds the employee name has a lookup function "SELECT [Employees_tbl].[Employee] FROM Employees_tbl ORDER BY [Employee]; "
Table two (Employees_tbl) contains the list of employees and their positions
On my form I have the Completed By (Employee Name) combo box working perfectly and looks up the correct values.
What I want to do it get the Position text box to automatically fill in the Position of the Employee based on the selection in the combo box.
Any help would be greatly appreciated!
Put this line of code in the combo_xxx AfterUpdate event:
You could also include the Position into the combo rowsource:
Me.Text_Position.Value = DLookup("Position", "Employees_Tbl", "Employee = '" & Me.Combo_xxx.Value & "'")
"SELECT Employee, Position FROM Employees_tbl ORDER BY Employee;"
Then in the combo_xxx AfterUpdate event:
Me.Text_Position.Value = Me.Combo_xxx.Column(1)
Have a nice day!
You're a star, that worked perfectly!