Go to a record from combobox selection

Psycholicon

Registered User.
Local time
Today, 13:02
Joined
Aug 14, 2007
Messages
33
Hi, this seems like a pretty simple problem, but I can't figure it out.

I have a form based off one table that has people's names as a primary key, and then a bunch of fields for information about them. I want to have a combobox that lists their names, and then on the selection of the name, it goes to their record. I don't want to add a new record, just to edit the existing one. However, at the moment either I can get the [Person_Name] control to change because of the combobox and the rest of the fields just don't, or it tells me that I can't assign a value to the object when I try to take the combobox out and make it look up by inputbox on open or command button. I'm very frustrated because I know it must be something simple, so thanks for your help.

Thanks
 
Try the combo box wizard, choosing the third option, "Find a record...".
 
it comes up with a runtime error 3021 : no current record whenever I select from the combobox
 
it comes up with a runtime error 3021 : no current record whenever I select from the combobox

Did you follow Paul's instructions to create a new combo box on your form using the Wizard and when the wizard asks what you want to do, it will give you three options -

1. Find a record on the form

2. Store that value for future use

3. Store that value in a field

Select the option to find a record on the form.
 
I had done that but kept getting runtime errors. I finfally got fed up and deleted the form and started from scratch and it's working fine now. I guess in trying to do it I flipped the wrong property accidentally and it was doomed. Sorry to bother you with such a simple problem, but thanks for your help anyway!
 
What about two boxes

What about if you have two combo boxes and you would like to make a record selection with either of them, how do you get the other one to update instead of staying on its last value?
 
hey braven944, just search the forum for cascading combo and you'll get a heap of information.
 
Braven944,
If you have two combo boxes and you want to be able to be able to select records on either, you will probably need to enter code in the after update Event of both. If you want the selection of one combo box to affect the record source of another combo box than you will need to use cascading combo boxes as wiklendt posted.
 

Users who are viewing this thread

Back
Top Bottom