Using a combobox to find a record and populate fields (1 Viewer)

kdw3

New member
Local time
Today, 05:59
Joined
Jun 7, 2010
Messages
6
Hi there, I'm sure this is a stupid question but here goes.

I have a form that contains bound textboxes to a table in the db. What I want to be able to do is to have a combobox which I use to select the customers name, have it fill the textboxes with the right info so that I can edit the details. The problem I am having is that whenever I select a value from the combobox, it populates the fields with the right data but as soon as the combobox loses focus, the textboxes display the data from the next record. I havent coded anything in VBA, I have just used the wizard.

Am I missing something obvious? I am using Access 2007

Thanks in advance
 

dkinley

Access Hack by Choice
Local time
Yesterday, 23:59
Joined
Jul 29, 2008
Messages
2,016
Hello and welcome to the forums!

So what you are wanting to do is for the user to utilize the combo box as a 'find a specific record' feature?

That is, when the user selects the combo box, the form leaps to the correct record for editing?

-dK
 

kdw3

New member
Local time
Today, 05:59
Joined
Jun 7, 2010
Messages
6
Hi.

Yes, thats exactly what I want to do. The form is just simply to edit a customers details if the need arises, but as I mentioned, I cant get it to stay on the right record, it always jumps forward one when the combobox loses focus.

Thanks
 

kdw3

New member
Local time
Today, 05:59
Joined
Jun 7, 2010
Messages
6
Hi,

Thanks a lot for your help. Its a very useful link. Cheers
 

boblarson

Smeghead
Local time
Yesterday, 21:59
Joined
Jan 12, 2001
Messages
32,059
If your data is stored somewhere then you shouldn't be taking those fields and storing them again. You just store the ID of the customer and then you can DISPLAY the rest but you should NOT be storing the other data.
 

Users who are viewing this thread

Top Bottom