Filtering using drop down list
  Home FAQ Contact Sign in
at.fido.msaccess only
 
Advanced search
POPULAR GROUPS

more...

at.fido.msaccess Profile…
 Up
Filtering using drop down list         


Author: Sandy Nuts
Date: Jan 15, 2007 07:05

I have a drop down list which I'd like to use to filter the records within
the form. The drop down list contains a list of managers who are responsible
for certain buildings.

I'd like to select a managers name, then the records shown within the form
are those which are related to said manager.

I have a table called tblProperty which contains the building names. There
is also a table called tblManagers for each manager. tblProperty has a field
ManagerID, as does tblManagers. I have setup a relationship between the two
ManagerID fields. Correct?

What I'd like now, is to select the manager and perform a query which will
display the records related to this manager.

I'm thinking that some form of event code is needed for After Update?

Any hints or tips would be much appreciated.
2 Comments
Re: Filtering using drop down list         


Date: Jan 15, 2007 08:16

I'm envisioning a form with an unbound combobox in the header. This
combobox is based on a query of the Manager table, and returns the ManagerID
and ManagerName. The form itself is based on a query of the Property table,
and includes a Criterion under the ManagerID field (in the Property table)
of something like:
Forms!YourFormName!cboYourManagerComboboxName

In the combobox's AfterUpdate event, you could use:
Me.Requery

This would have the form open without records (because no Manager has been
selected). Once a Manager is selection, the form re-queries the Property
table, looking for properties with a Manager matching the one selected.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
Show full article (1.81Kb)
1 Comment
Re: Filtering using drop down list         


Date: Jan 16, 2007 05:08

It sounds like the form is bound to the entire recordset, rather than, as it
sounded like you want, bound to a single record. The description I provided
was a suggestion of how it could be.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/

"Sandy Nuts" these.com> wrote in message
news:jI1rh.31709$k74.2869@text.news.blueyonder.co.uk...
>
> "Jeff Boyce" msn.com-DISCARD_HYPHEN_TO_END> wrote in message
> news:%%23ZJxEAMOHHA...
Show full article (1.92Kb)
no comments