from froms to queries

A

arun_bhilai

hi,
i am new to access and working on access 2000.
my problem goes like this.
i have a table in which i have different departments for my company.
i have another table in which i have all the employess id, their department,
name and designation.
in a form i want that in a particular feid if i enter the department (from a
combo box), i should have all the employees details that are working in that
particular deprtment. i will choose the particular employee and the
designation of that employee should get stored in the forms feild.
please help.
thanks in advance.
arun
 
A

Al Campagna

Arun,
Let's say you have a combobox named cboDepartment, and you want the value
selected in cboDepartment to filter a second combobox named cboEmployees.
Include the related Department field with your Employee data in
cboEmployee, and give it a criteria of...
=Forms!YourFormName!cboDepartment
Do a cboEmployee.Requery on the AfterUpdate event of cboDepartment to
make sure the combos are in "synch" each time cboDepartment might change.

Given a cboDepartment = "Sales", cboEmployees would only show Sales
employees.
I have an A2003 and A97 sample file called Synched Combos on my website
(listed below) which demonstrates this process.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top