ComboBox value to update another combo box (1 Viewer)

stu_c

Registered User.
Local time
Today, 15:33
Joined
Sep 20, 2007
Messages
489
Hi all
strange one I know I have a form with the following fields
CMbStaffName -Picks up from QRYAllAthorisedStaff
CmbDepartment
CmbArea

When the staff name is chosen I want it to input the last entered department and Area for that staff member to be saved so when the same staff member is selected it shows it, but doesn't change the previous records, but if the user needs to change the department they can, I thought maybe I could do an after update on the CMBDepartment field to update the column but no luck any suggestions?

Code:
Me.CMbStaffName.[Column](4).Value = Me.CmbDepartment.[Column](1)
 

Minty

AWF VIP
Local time
Today, 15:33
Joined
Jul 26, 2013
Messages
10,354
You can't update a value in a combo list, it's a fixed set of data.
You can make a selection from the combo, but only the bound column value.

Your syntax is incorrect, I think you want something like this.

Me.CmbDepartment = Me.CMbStaffName.Column(4)

Omit the .Value - it is the default property and not needed.
Also, remember that the column numbering is zero-based so the first column is (0)
 

Users who are viewing this thread

Top Bottom