automatically filling fields

  • Thread starter Thread starter Sean
  • Start date Start date
S

Sean

I have three fields on a form, they include first name,
last name, and phone number. What I want to do is have
the data steward enter the last name and then have the
computer automatically fill in the first name and the
phone number. Currently I have approximately 100 people
in three pick lists (first name, last name, phone #). My
question is how do I get the form to automatically fill in
the other fields.
 
Sean, there are several methods that can achieve your
objective. I am currently using both in an A2k database.
1) use the DLookup to populate the remaining fields
2) use a query binding the form
Hope this gets you in the right direction.
*** John
 
Sean,

If the steward can only enter names of people already in the database,
then use a combo box instead of a text box.
Set the RowSource property of the combo box to select the last name,
first name, and phone number from your data.
Then, in the AfterUpdate event of the combo box, set the values of
your first name and phone number as:

Me.txtNameFirst = Me.cboNameLast.Column(1)
Me.txtPhoneNum = Me.cboNameLast.Column(2)

--
HTH

Dale Fye


I have three fields on a form, they include first name,
last name, and phone number. What I want to do is have
the data steward enter the last name and then have the
computer automatically fill in the first name and the
phone number. Currently I have approximately 100 people
in three pick lists (first name, last name, phone #). My
question is how do I get the form to automatically fill in
the other fields.
 
Back
Top