Need Help

P

PAOLA

hola este es un mensaje de prueba
John W. Vinson said:
Well... Don't.

Autonumbers a) *are* numbers, and cannot contain text; and b) are
meaningless,
arbitrary numbers which will develop gaps in the sequence and can become
random. An Autonumber field should basically NEVER be visible to the user;
it
just ties things together behind the scenes. In addition, you should NEVER
store two pieces of information (your prefix and the number) in the same
field!

Why do you feel that this is needed? Where will the composite number go,
and
what's the meaning of the prefix?

John W. Vinson [MVP]
 
R

Ron

I am creating a database and need some help. I have several tables with forms
to input information. I have a main table that some of the information from
the forms is inputted. What i want to do is put a control button that when
clicked it puts an auto number in a field with a pre-fix like QMS, NC, etc.
Can some one please advise how I can do this.
 
J

John W. Vinson

I am creating a database and need some help. I have several tables with forms
to input information. I have a main table that some of the information from
the forms is inputted. What i want to do is put a control button that when
clicked it puts an auto number in a field with a pre-fix like QMS, NC, etc.
Can some one please advise how I can do this.

Well... Don't.

Autonumbers a) *are* numbers, and cannot contain text; and b) are meaningless,
arbitrary numbers which will develop gaps in the sequence and can become
random. An Autonumber field should basically NEVER be visible to the user; it
just ties things together behind the scenes. In addition, you should NEVER
store two pieces of information (your prefix and the number) in the same
field!

Why do you feel that this is needed? Where will the composite number go, and
what's the meaning of the prefix?

John W. Vinson [MVP]
 
R

Ron

John W. Vinson said:
Well... Don't.

Autonumbers a) *are* numbers, and cannot contain text; and b) are meaningless,
arbitrary numbers which will develop gaps in the sequence and can become
random. An Autonumber field should basically NEVER be visible to the user; it
just ties things together behind the scenes. In addition, you should NEVER
store two pieces of information (your prefix and the number) in the same
field!

Why do you feel that this is needed? Where will the composite number go, and
what's the meaning of the prefix?

John W. Vinson [MVP]

The purpose for the prefix is to identify the different types of
information. I have a tables that are Corrective Action, Non-Conformacne,
Internal Audits, Quality and preveitive actions. I want each to have their
own identification such as NC, CAR, etc. Each table has an auto number that
indentifies each record. What I am trying to do is to use the autonumber that
is in the Corrective action table, becuase some of the information is related
and then take that number and input it into a field that shows CAR-123 or
NC-456 and so on. I also want this number to be inputed back to the main CAR
table.

Also I want to use a button to create this number.

Here is an example.

Table CAR
Auto#, ID #, Customer Name, etc.
1 CAR-01 Joe's Tire
2 CAR-02 Joe Smith
3 NC-03 Tim
Table Non-Conformance
Auto# ID # Failure Code
1 NC-03 Broken
And so on. Hope you can help me with this.
 
J

John W. Vinson

The purpose for the prefix is to identify the different types of
information. I have a tables that are Corrective Action, Non-Conformacne,
Internal Audits, Quality and preveitive actions. I want each to have their
own identification such as NC, CAR, etc. Each table has an auto number that
indentifies each record. What I am trying to do is to use the autonumber that
is in the Corrective action table, becuase some of the information is related
and then take that number and input it into a field that shows CAR-123 or
NC-456 and so on. I also want this number to be inputed back to the main CAR
table.

Also I want to use a button to create this number.

Here is an example.

Table CAR
Auto#, ID #, Customer Name, etc.
1 CAR-01 Joe's Tire
2 CAR-02 Joe Smith
3 NC-03 Tim
Table Non-Conformance
Auto# ID # Failure Code
1 NC-03 Broken
And so on. Hope you can help me with this.

I think you have things backwards.

Each Table should represent one kind of Entity. If one Customer has multiple
Cars, and each Car can have multiple Actions, you would have three tables:

Customers
CustomerID <autonumber>
LastName
FirstName
<other bio information>

Cars
VIN <text primary key>
Make
Model
<information about the car itself>

FailureModes
FailureModeID <autonumber primary key>
FailureMode <e.g. Broken Timing Belt>

Failures
FailureID <Autonumber - NOT displayed to the user, it's not necessary!>
VIN <link to Cars, what failed>
FailureModeID <how it failed>
<other fields about this failure>


I suspect you're making the common mistake of assuming that users will be
looking at the tables and at the data as it is stored in tables. They
shouldn't ever even SEE a table! Instead, you'll use a Form displaying the
data stored in the table, or displaying Combo Boxes bound to number fields in
the table but displaying meaningful text such as a FailureMode. Storing a
three characther text string CAR- in every record in a table is purely and
simply a waste of space!
 

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