Easy Access Question from newbie

F

Frankie

Easy Access Question from a newbie
I have set up a very simple database. One table with Customer #, Customer
Name, & Customer Address. Another table to record purchases and a form to
populate the purchases. The form is also simple with a field for date,
another for customer #, another for customer name, and another for # of items
purchased. What I would like to do is when the customer # is input to the
form, it would automatically find the customer name and populate that field
on the form. I am VERY new to access and trying to keep things simple. Please
feel free to talk down to me, so that I can understand. Thank you in advance
 
N

NG

Hi Frankie,

2 simple solutions:
1/ make a headform with customers data and a subform with purchases in it,
linked on the customerID. In this case when you go to a customer, his
purchases are listed on the same form as his name.

2/ on the purchases form: create a combo box for the customer, with
properties set something like:

DATA PROPERTIES:
rowourcetype: table/query
rowsource: select customerID, customerName from tblCustomers order by
customerName
bound column: 1
FORMAT PROPERTIES:
Bound column: 1
Column widths: 0 cm, 5 cm

In this way the ID will be filled in but the name will be shown.

You can do this manually or by using a wizzard.
 
J

John W. Vinson

Easy Access Question from a newbie
I have set up a very simple database. One table with Customer #, Customer
Name, & Customer Address. Another table to record purchases and a form to
populate the purchases. The form is also simple with a field for date,
another for customer #, another for customer name, and another for # of items
purchased. What I would like to do is when the customer # is input to the
form, it would automatically find the customer name and populate that field
on the form. I am VERY new to access and trying to keep things simple. Please
feel free to talk down to me, so that I can understand. Thank you in advance

If you're trying to store the customer name in the purchases table... DON'T!!
It wastes space, and leaves you open to data errors (if you find that the name
is misspelled you have to track down all the instances for example).

In a relational database, you store information once, and once only; and then
use queries or other tools to *display* the data from the other table. The
purchases table should contain the customer number and *NOTHING* else from the
customer table.

You can use a Form based on Customers and a Subform based on purchases; or a
combo box storing the customer number but displaying the name; or other
techniques - but DON'T store the name redundantly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top