P
pjscott
I'm using Access 2003 and Sql 2000. I'm trying to sync 2 combo boxes that are
in a sub form. The 2 combo boxes are Branch and Department. I'm using the
code below to sync the 2 combo boxes.
I'm having 2 problems. One, when I open the form the Branch combo box
doesn't display any data even though the data is there. If I select a Branch
name from the combo box the Branch combo box remains populated but that
creates problem two.
Problem two, when you select a name from the Branch combo box it populates
the field with the Branch name but when you check the table the Branch field
displays the BranchId number and not the Branch name.
Me.cboDepartment.RowSource = "SELECT Departments FROM" & _
" tblDepartments WHERE BranchId = " & cboBranch & _
" ORDER BY Departments"
When do I need to do to solve these problems.
Thanks for the help,
Paul
in a sub form. The 2 combo boxes are Branch and Department. I'm using the
code below to sync the 2 combo boxes.
I'm having 2 problems. One, when I open the form the Branch combo box
doesn't display any data even though the data is there. If I select a Branch
name from the combo box the Branch combo box remains populated but that
creates problem two.
Problem two, when you select a name from the Branch combo box it populates
the field with the Branch name but when you check the table the Branch field
displays the BranchId number and not the Branch name.
Me.cboDepartment.RowSource = "SELECT Departments FROM" & _
" tblDepartments WHERE BranchId = " & cboBranch & _
" ORDER BY Departments"
When do I need to do to solve these problems.
Thanks for the help,
Paul