Connect Name/Address

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I design a table so that when a Name is entered in the form the
matching address, etc. will auto fill in the form? Is this a fairly simple
process or does it require programming?
Thanks!
 
Sam

First, if you are talking about having this happen in a table, DON'T!
Access tables store data, Access forms display it (for add/edit/...).

Second, if your field is called "Name", change it! Access uses this term as
a reserved word, so you will only confuse both Access and yourself if you
use this term. You could change it to FirstName, ... (which brings up point
#3 -- if you only are storing a full name, but will ever want to sort by
last name, you'll be working extra hard! Instead, use FirstName and
LastName fields to store these two pieces of data.)

Third, if your database is well-normalized (this is Access, right? You
can't expect to get good use of Access' features and functions if you feed
it spreadsheet data), you don't need to (redundantly-)store the "matching
address". If you have an address that matches, you already have the address
and don't need to store it more than once.

If you'll post back with a description of your table structure, folks here
in the newsgroup can offer better suggestions for helping you get your
database better use Access' features.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
How do I design a table so that when a Name is entered in the form the
matching address, etc. will auto fill in the form? Is this a fairly simple
process or does it require programming?
Thanks!

JUst to add yet another objection to Jeff's excellent suggestions:
what if you have two people who happen to have the same name? Names
are NOT unique; I know three men named Fred Brown right here in little
Parma.

You're asking the wrong question. Ask instead "How can I find data for
a person given their name and probably other relevant identifying
information"? The answer may involve some code, but it's likely that
the Form Wizard will do it for you: create a combo box on the form
using the option "Use this combo to find a record".


John W. Vinson[MVP]
 
I think my first post was unclear to say the least. I want to create a
product order form and also document mailings. When entering the customer
name I need to see other details (address, etc.) to verify that is the
correct person.
 
I think my first post was unclear to say the least. I want to create a
product order form and also document mailings. When entering the customer
name I need to see other details (address, etc.) to verify that is the
correct person.

One way is to use a Combo Box to select the name (presumably storing
the person's unique ID in the order table). If you include the other
details in the Query being used as the combo's rowsource, you can put
textboxes on the Form with control sources like

=comboboxname.Column(n)

where n is the zero based index of the field in the query - e.g. if
the customer's phone number is the fourth field in the query, use (3).

John W. Vinson[MVP]
 
Back
Top