Search field

S

Stephanie

Hello there. I hope I can explain this well enough for the discussion group
to help.

I have Contacts who have Animals. When I set up a new Animal record, I
assign a PrimaryOwner (which is a Contact) using cboOwner:
SELECT Contacts.ContactID, Nz([NickName],[FirstName]) & " " & [LastName] AS
[Member Name], MemberType.MemberType
FROM Contacts INNER JOIN MemberType ON Contacts.MemberTypeID =
MemberType.MemberTypeID
WHERE (((MemberType.MemberType)="Handler"))
ORDER BY Contacts.LastName;

This brings back all Contacts, which is correct.

I want to have a search field so that on the Animals form, you can select
the PrimaryOwner from cmbSearch. Here's where I'm having difficulties. I
can't seem to figure out what to base cmbSearch on. When I base it on
Contacts, I get a list of all Contacts but many are not PrimaryOwners and are
therefore not associated with Animals. Rather than indicating there is no
record, the combo box seems to randomly select a record. I don't seem to be
limiting cmbSearch based on already assigned Contacts(/Animals) from cboOwner.

Any suggestions? My brain hurts!
 

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