Cascading Combo Boxes on in Form

  • Thread starter Thread starter Michelle H.
  • Start date Start date
M

Michelle H.

Hi There. I have a form that has 4 feilds: Date, Hours, Supervisor, and EE
Name. The Supervisor and EE name fields are drop downs. I would like the
user to be able to select a supervisor name and the EE Name field drop down
populate with the employees that report to that supervisor. Once the
selection has been made I would like the next record to be blank and follow
the same process. I have been able to figure out how to make the EE Name
field populate based on the selection made in the Supervisor field but the
problem I am having is that instead of the EE Name field being blank and
using the drop down, it automatically brings up the name of the first EE.
Any ideas? I'm stumped. Thanks.
 
You need to requery the EE combo box in the form's Current event procedure
as well as in the AfterUpdate event procedure of the Supervisor combo box.

However, by having the supervisor column in the table as well as the EE
column you might be introducing redundancy and the possibility of
inconsistent data. If an employee's supervisor changes then would you want
all existing rows in the table to automatically reflect that change, or would
you want them to show the supervisor at the time the row was inserted? If
the latter then having both columns in the table is fine. If the former you
only need the EE column as the supervisor can be shown in an unbound control
and will always show the current supervisor per employee. With both columns
the table is not in Third Normal Form (3NF).

You can still follow your 'top down selection' approach while maintaining
the table in 3NF and you'll find a demo of how to do this at:


http://community.netscape.com/n/pfx...yMessages&tsn=1&tid=23626&webtag=ws-msdevapps


The demo file uses the local administrative areas in my location and there
are 3 levels to the hierarchy rather than 2, but the principle is the same
and with only 2 levels its easier to implement.

Ken Sheridan
Stafford, England
 
Back
Top