form subform

  • Thread starter Thread starter Khalil Handal
  • Start date Start date
K

Khalil Handal

frmCity and subform frmEmployees are based on a quiery.
I need the code so that when I elect the city frmCity (combo box) to display
the employees from that city only. What code do I need? (I think it should
be in the afterupdateevent if i am not mistaken)!
 
Khalil,
If you've developed your tables correctly... no code at all.
Every Employee record should have a CityID entry.
The cboCityID combo on the main form should select a CityID.

If the Form/Subform Parent/Child link fields are CityID to CityID, the
correct employess will show up "automatically" when any CityID is selected
on the main.
(I'm assuming that your cboCityID is unbound, and only used to select
the various CityIDs... for employee record review in the subform)
--
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."
 
Thanks.

Al Campagna said:
Khalil,
If you've developed your tables correctly... no code at all.
Every Employee record should have a CityID entry.
The cboCityID combo on the main form should select a CityID.

If the Form/Subform Parent/Child link fields are CityID to CityID, the
correct employess will show up "automatically" when any CityID is selected
on the main.
(I'm assuming that your cboCityID is unbound, and only used to select
the various CityIDs... for employee record review in the subform)
--
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."
 
Back
Top