nested forms


B

Bill - ESAI

good day everyone

Here's a simple scenario of what I'm trying to do.

I have a form for inputting company departments. Nested at the bottom of
that form is another form for inputting the employees that are members of
that department. Each works by itself. I have the one to many relationship
in place between the department and the employee tables but I can't seem to
figure out how to set up the forms properly so that as I navigate (both
forms has "Navigation Buttons" set to yes) through the departments the
employee form only displays the employees that belong to the department that
is currently populated in the parent "Department" form.

So, say I have 5 departments, I mouse down on the department form and can
navigate through the 5 departments. The employee form at the bottom of the
department form populates with say the first record returned based on the
department that is currently displayed. If I stop on the 3rd department and
mouse click on the employee form I want to be able to navigate through only
the employees belonging to that department. I'm currently have an "On
Change" event on the Department ID form element and have been trying to use
that as the object to reset the query for the employee form. I can't seem to
get that to work.

I'm quite certain that I'm just not applying my commands properly so I'm
wondering if someone might be able to walk me through getting this to work.

Thank in advance

Bill
 
Ad

Advertisements

P

Piet Linden

good day everyone

Here's a simple scenario of what I'm trying to do.

I have a form for inputting company departments. Nested at the bottom of
that form is another form for inputting the employees that are members of
that department. Each works by itself. I have the one to many relationship
in place between the department and the employee tables but I can't seem to
figure out how to set up the forms properly so that as I navigate (both
forms has "Navigation Buttons" set to yes) through the departments the
employee form only displays the employees that belong to the department that
is currently populated in the parent "Department" form.

So, say I have 5 departments, I mouse down on the department form and can
navigate through the 5 departments. The employee form at the bottom of the
department form populates with say the first record returned based on the
department that is currently displayed. If I stop on the 3rd department and
mouse click on the employee form I want to be able to navigate through only
the employees belonging to that department. I'm currently have an "On
Change" event on the Department ID form element and have been trying to use
that as the object to reset the query for the employee form. I can't seemto
get that to work.

I'm quite certain that I'm just not applying my commands properly so I'm
wondering if someone might be able to walk me through getting this to work.

Thank in advance

Bill

do you have a relationship set up between Department and Employee (on
DepartmentID)? That should fix it. Also, do you have the LinkMaster
and LinkChild properties of the subform set?
 

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