Update a form based on changing from Combo Box

We have a form that has a field called Name which containts a persons name and then in that record is all their personal info. We are using a combo box for the name so you can type in someones name and it will auto fill for you but i need it to update all the other fields on a form when you hit enter or tab out of the field. How is this possible?
LVL 8
akalbfellAsked:
Who is Participating?
 
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:
akalbfell,

What is the purpose of this form?
I think LSM's presumption is that the Name info is only part of the data that this form collects.

To me, this could be a "Personal Info" form (Employee, Student, Member)
In this case what you are describing seems like a "Search" combobox.
You want to type in a name and have the form "Jump To" that record.
(Thus "Completing" the fields)

This combobox SHOULD NOT be the same as the box you actually use to enter new names.

You can use the Combobox wizard.

Drop a combobox on your form.
When the wizard opens select:  "Find a record on my form..."
Then follow the rest of the wizard's steps.

JeffCoachman
0
 
ClothahumpCommented:
Add code behind the combo box click event that will read the person table and update the fields accordingly.
0
 
akalbfellAuthor Commented:
Thanks for the response. I had assumed this was what was needed to be done but i need help doing it.
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Is the form based on a Table/Query? If so, and if your combo contains that ID field from that table/query, then you could do this:

Dim rst As DAO.Recorset

Set rst = Me.RecorsetClone
rst.FindFirst "YourTableIDField=" & Me.YourCombo.Column(0)

If Not rst.NoMatch Then
  Me.Bookmark = rst.Bookmark
End If

Note that the Column property of the combo is zero-based, meaning that the first column is Column(0), the second is Column(1) etc.
0
 
akalbfellAuthor Commented:
Thanks so much, exactly what i was looking for and no coding behind it.
0
 
Jeffrey CoachmanMIS LiasonCommented:
Yes, I had to read your question a few times before I realized that it could have another meaning.
That is why I posted another alternative.

"and no coding behind it."

There IS code that is created by the wizard to do this.
But it was created behind the scenes.
Open the form and press Alt-F11 and find the "After Update" code for the combobox.
;-)

JeffCoachman
0
 
Jeffrey CoachmanMIS LiasonCommented:
Yes, I had to read your question a few times before I realized that it could have another meaning.
That is why I posted another alternative.

"and no coding behind it."

There IS code that is created by the wizard to do this.
But it was created behind the scenes.
Open the form and press Alt-F11 and find the "After Update" code for the combobox.
;-)

JeffCoachman
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.