Find multiple records using dropdown

G

Guest

I would like to create a form that shows all notes that were recorded for a
specific facility (using a Facility dropdown). My tables are Contacts and
Notes - A contact has a facility which is chosen using a facility lookup.
There are many contacts from one Facility and a Contact can have many notes.
When I choose the Facility from the dropdown in a form I get only the first
contact of that Facility who has notes. I would like to see all the Contacts
and their notes. I know this is easy, but I don't know what I'm missing.
Please help. Thanks
 
G

Guest

I guess you could use a filter for this.

In the afterupdate of your combo place the following (replace the fieldnames
for your own fieldnames)

Me.Filter = "[Facility]= '" & Me.Combobox & "'"
Me.FilterOn = True

'---
note: after the = sign you find an apostroph and a double quote, after the
last & you'll find a double quote a single quote and a double quote again..

hth
 
G

Guest

And if your facility combo returns an integer value than use

Me.Filter = "[City]= " & Me.Combo255
Me.FilterOn = True

note: lose the single quote behinde the = sign and the & "'" at the end..
 
G

Guest

Thanks, that worked.

Maurice said:
And if your facility combo returns an integer value than use

Me.Filter = "[City]= " & Me.Combo255
Me.FilterOn = True

note: lose the single quote behinde the = sign and the & "'" at the end..
--
Maurice Ausum


DRMOB said:
I would like to create a form that shows all notes that were recorded for a
specific facility (using a Facility dropdown). My tables are Contacts and
Notes - A contact has a facility which is chosen using a facility lookup.
There are many contacts from one Facility and a Contact can have many notes.
When I choose the Facility from the dropdown in a form I get only the first
contact of that Facility who has notes. I would like to see all the Contacts
and their notes. I know this is easy, but I don't know what I'm missing.
Please help. Thanks
 

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