ID Number

G

Guest

I am doing a database with two tables. The first table has client info. In
this table, each client is assigned a unique number using the "AutoNumber"
feature. The second table has services the client requested. In this second
table I want Access to automatically enter the client ID number that was
issued in the first table. How do I do this? Thanks!
 
A

Arvin Meyer [MVP]

willm16 said:
I am doing a database with two tables. The first table has client info. In
this table, each client is assigned a unique number using the "AutoNumber"
feature. The second table has services the client requested. In this
second
table I want Access to automatically enter the client ID number that was
issued in the first table. How do I do this? Thanks!

The only ways to do this automatically is with a Form/Subform which are
linked on the ID number, or through code, by writing a record to the second
table. The first is not only easier, it makes more sense from a relational
standpoint, not to build records when they are no needed.
 
G

Guest

You have to create a relationship between the two tables. If you do so you'll
see that when you open the table a little + sign appear. This means the table
has a relation and you can enter data directly into the table and the related
table. The id will be automatically filled. On that point everyone will tell
you not to enter data directly into the tables and so will I. So create a
form with a subform to create a interface for entering data.

The most easy way to accomplish this is by using a autoform.
Click on the tablename (eg Client) in the databasewindow (do not open the
table just activate is so the tablename is selected).
Now click in the menubar on the button which says 'New Autoform' (the one
with the little lightning flash beside it).

Access will now create a form and a subform based on the direct related
tables.
In a later stadium you'll see that you will want to create thos forms
yourself.

hth
 

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

Similar Threads

Macros & Tables 1
Querying 2 Tables 4
Form from a query 1
Concatenate Date and Number field for Append Query 0
Sorting in Reports 1
Showing ID field 6
Query by DOB 1
Database design/ tables design 1

Top