How to format autonumbers

D

Deanna

I would like to know if there is a way to autonumber a
field based on another field.

Example:

Goals Table
Goal (A, B, C, etc.)
Description

Results Table
Goal (from Goal Table)
Result #
Result Description

There can be multiple results for each goal. Therefore,
the result # needs to be A.1, A.2, B.1, C.1, C.2, etc.

Is there a way to have the Result # autonumber depending
on which Goal is in the Goal field? Say if I enter A in
the Goal field on the Result Table, it would create A.1
for the result #. If there is already an A.1 and A.2, it
would create A.3.

Thanks for any help.
Deanna
 
R

Roger Carlson

On my website (see sig below) are a couple of small sample databases that
might help: "FormSubform.mdb" and "AutonumberProblem.mdb". Neither do
exactly what you want, but they may give you some ideas.
 
T

Tony Toews

Joseph Meehan said:
Auto numbers are good for only one thing. They create an almost always
unique number. They don't always stay in order

If using the Random property which is required for replicated MDBs.
In which case they are absolutely not in order.
fill in old unused numbers etc.

Eh? I haven't seen this behavior.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
T

Tony Toews

Joseph Meehan said:
If you do a compact of a database it may reuse the numbers that have
been deleted.

It should not be counted on to do so however.

Ah, yes, ok. I was thinking in terms of 1,2,4,5,6 and Jet would
reissue 3.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

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