Auto display information when entering ID

C

CSCS

Hi All!

I'm working on a Personal Information Database.

I want my system to do the following whenever I

enter a person's ID:

If the ID is already entered before, I want all

the personal info fields to be populated with

the person's details.

If the ID is not entered, then I will enter all

the person's details.

Any help will be very much appreciated!

Regards,
CS
 
J

Jeff Boyce

Not sure why you posted this question in a "queries" newsgroup -- it sounds
like a "forms" question.

Rather than forcing a user to know and enter an ID, consider using a combo
box to display person information, letting the user choose a "person" from a
list. The combo box can still hold the personID, just not display it.

And if the query serving as the source for the combo box includes the
"personal information" you wish displayed, you can use the AfterUpdate event
to place those pieces of personal information in other controls on the form.

Or, you could use the AfterUpdate event to requery the form. If you make
the source of the form the underlying person table, and use the combo box's
value as the criterion for which person row (ID), by selecting a person you
will be telling Access to requery the person table and show (on the form)
the record with an ID matching that of the person selected.

Regards

Jeff Boyce
<Access MVP>
 
Top