Combo Box - "Picks" Wrong with Similar Records (1 Viewer)

dmo

Registered User.
Local time
Today, 16:11
Joined
Sep 27, 2011
Messages
20
Hello and Many Many Thanks in Advance!

I have a combo box in a subform. The combo box is "based" on two of the subform fields: DogNameBreed and DogID (two columns in the drop down; name is first, then ID).

Every dog as a unique ID but, it is possible for there to be multiple dogs with the same name/breed combination. The first column in the combo box is the name/breed, allowing the user to "search" out a dog by it's name/breed. However, if there are multiple records with the same name/breed, the combo always defaults to the first dog in the list even when I pick a different one.

Example:
Toby, Rottweiler / ID 1001 / Owner Jane Smith
Toby, Rottweiler / ID 1002 / Owner Mike Jones

Even when I pick the Toby with ID 1002, the box returns results related to the Toby with ID 1001. I can't figure out what the heck is going on. Any thoughts would be very much appreciated.

THANKS!!!
 

JamesMcS

Keyboard-Chair Interface
Local time
Today, 21:11
Joined
Sep 7, 2009
Messages
1,819
What's the bound field you're using from this combo box? If it's a field that contains dupes, that might be your problem....
 

dmo

Registered User.
Local time
Today, 16:11
Joined
Sep 27, 2011
Messages
20
The bound field does contain dups (it's the name/breed field). I was hoping that by having the unique field (DogID) in the combo (but not as the bound field) it would resolve the problem.

Any suggestions on work arounds? Fields in the subform include...
the combobox (bound name/breed; unbound DogID)
textboxes which "fill in" based on the combo selection include: OwnerName, ClientID, DogID

Can I turn the "OwnerName" text field into a 2nd combo that's linked to the dog name/breed combo such that the selections in the OwnerName combo would be limited based on the DogName/Breed selection? (if this is a good work around, perhaps some additional help could be provided - I'm decent with macros but not code writing and I'm not sure how to limit one combo based on another - I'll hit up the board again and see what I can find).

thanks.
- Danielle
 

JamesMcS

Keyboard-Chair Interface
Local time
Today, 21:11
Joined
Sep 7, 2009
Messages
1,819
Have a look for cascading combo boxes on the boards and see what that brings up, it's quite a popular topic....
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 21:11
Joined
Sep 12, 2006
Messages
15,658
what is the bound column in your combo box (normally 1).

so normally you would have the dogid as the first column, and set the width to zero so it becomes "hidden". however when you pick a row, the row id is given by bound column - the hidden dogid - so you avoid the problem you are discussing.
 

dmo

Registered User.
Local time
Today, 16:11
Joined
Sep 27, 2011
Messages
20
Dave (Male)! Thanks. That's an even better work-around. And a simple update.

- Danielle(/Female) (Ellie and Sadie are mine! -- helping the dog training school I go to put together a client tracking database)
 

Users who are viewing this thread

Top Bottom