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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Jeffrey CoachmanMIS 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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.