One of the easiest ways is to include in your combo box all of the fields
you need to look up. (You can hide the extra fields by setting their column
widths to 0) You can then reference the values by using the Column property
of the combo. For example, if your combo box is named cboPerson and your
combo box columns are PersonID, Name, Address, City, State and Zip:
PersonID = cboPerson.colum n(0) [the columns are 0-based]
Name= cboPerson.colum n(1)
Address = cboPerson.colum n(2)
City = cboPerson.colum n(3)
etc.
You can populate your other fields by using the AfterUpdate event for the
combo box. In the AfterUpdate procedure, you would update the fields on
your Event form as follows:
txtName = cboPerson.colum n(1)
txtAddress = cboPerson.colum n(2)
etc
The other method you can use is to directly set the Control Source on your
Event form text boxes equal to a value from the combo box. For example, the
Control Source setting for txtName would be:
= cboPerson.colum n(1)
This second method will not work if you are using bound columns on your
form; you will have to use the first method.
Hope this answers your question.
--
Allan Thompson
APT Associates/ FieldScope LLC
MS Office Automation / Measurement and Reporting Systems
www.fieldscope.com
860.242.4184
"Pasquale" <sp*****@NOTHNX telusplanet.net > wrote in message
news:40******** ****@NOTHNXtelu splanet.net...
Thanks.
I was able to get the names to list in a combo box(select drop down
menu), but once the name is selected, how do I get the rest of their
information to automatically fill in the rest of the fileds, like their
address, phone, etc.?
Cascader wrote: Pasquale wrote:
I have a database used for contact information and another for event
information. As part of the event database, we would like to keep
record of the people that are attending a certain event. These are the
same people who are in the contact database.
Using a MS Access form in the event database, is there a way to select
the names from the contact database in the Name field when adding who
is attending an event, rather than typing their informaion all over
again for every event they attend? I hoping there is a way to link
these two databases somehow.
Thanks
Pasquale
I suggest you use linked tables. You can link for example constact
table(s) into your events database and work as if it was local. Try :
File -> Get External Data -> Link Tables...