Search Cbo on Form with Subform

AFKillbait

Registered User.
Local time
Yesterday, 17:52
Joined
Aug 8, 2009
Messages
27
I am attempting to set up a search on one of my forms to allow me to skip straight to a specific individual, however when I use the search it goes to the record BEFORE the person I selected. The search code I'm using is the same I've used in a previous form, so I'm not certain why it does not work on this one. I have the following in the combo box's AfterUpdate code.

Code:
Me!Owner.SetFocus
DoCmd.FindRecord Me!Combo93, acEntire

The only thing I can think of is that because of the subform being related to the main form items it's interfering in some way, but not sure how to fix it.
 
First, do you get any errors? I don't know anything about the code you are using, but I don't think you need to use any code if your database is built properly, the combobox wizard should work.

Can you tell us more about your structure? The combobox is on the subform, and is there to find a record on your subform? Assuming that answer is yes, then is the record you are looking for related to the record on the main form?

How are your main form and child forms linked? Actually it would be a lot easier if I could see what you are looking at, could you post your db? zip it up first. Also, if it is 2007, please convert to 2003 as I don't have 2007.
 
The FindRecord method will only return one record. What is the bound field of Combo93? If it is only a last name, for instance "Smith," then FindRecord is going to return the first Smith in the form it comes to, and if you have, in alpha order by LastName, FirstName

Smith, Adam
Smith, John
Smith, William

it's going to return

Smith, Adam

whether you select Adam, John or William.

If this is the situation lets us know and someone will walk you thru fixing it.

And nothing was said about the combobox being on the subform, only that there was one, which shouldn't be interfering.
 

Users who are viewing this thread

Back
Top Bottom