Synchronize two combo boxes on a form

P

pjscott

I'm using Sql 2000 and Access 2003. I'm using the code below that's from
Article ID 289670.

Me.Department.RowSource = "SELECT Departments FROM" & _
" Department WHERE BranchId = " & Me.Branch & _
" ORDER BY Departments"

Me.Department = Me.Department.ItemData(0)

I got the code to work but I had to copy and rename my tables to Department
and Branch. My original tables were named with tbl. My combo boxes were named
with cbo but I had to rename them.

I've tried everything to get the code to work with the tbl and cbo but
nothing works.

It would be too much work to have to go through the entire db and make
everything work using the Department and Branch tables.

How can I get the code to work using tblDepartment, tblBranch, cboBranch and
cboDepartment ?

Thanks,

Paul
 
R

ruralguy via AccessMonster.com

It should work using *your* names. Tell us what happens when you use your
names?
 
D

Douglas J. Steele

Me.cboDepartment.RowSource = "SELECT Departments FROM" & _
" tblDepartment WHERE BranchId = " & Me.cboBranch & _
" ORDER BY Departments
 
P

pjscott

That worked. The code was a little hard to figure out since the tables and
combo boxes were named the name in the NorthWinds db.

Thanks for the help,

Paul
 
Top