Very simple autonumber question...

Kleenex

New member
Local time
Today, 00:30
Joined
May 27, 2007
Messages
2
Hello,

I have built a very complicated database but it is late and the answer to this question is just gone from my mind.

Basically i have a table which has an autonumber as a unique identifyer. I have a form which pulls this data and puts it onto a continuous form (for data entry and editing). However this data is linked to annother primary table. For example:

Table A holds all the cinema screens in a cinema.

Table B has information on each individual seat.

The form shows all the seats for a specific screen and therefore does not always start at 1. So i cant simply drag the auto number field onto the form since sometimes it could star at number 100 or somthing.

Now there must be an = function to just count from 1 adding one each time annother instance of the continuous form is created. This number is purly for cosmetic reasons and does not need to be stored.

I do not want to create annother table with an autonumber field in to reference it. Im sure there is an = function i just cant remember it.

Thanks for your help in advance.
-Kleenex
 
You should not be trying to assign meaning to an autonumber. An autonumber is ONLY guaranteed to give you a UNIQUE number. If you start a record and then cancel, the autonumber is forever gone.

You need to create your own numbering (possibly using DMAX to check for the highest number). The autonumbering should be used as primary key in one table and as foreign key (long integer) in the other, but that is only to link them together.

You can read more about it in the FAQ section at this post:
http://www.access-programmers.co.uk/forums/showthread.php?t=128935
 
Dont think you understood my question....

All tables, relaitonships are built... interfaces are built.

Simply i want a continuous form to number the records as it creates them in a list.


So a continuous form shows this:

First Name Last Name Age

Steven Smith 42
Katie Robinson 19




To show this:

No. First Name Last Name Age

1 Steven Smith 42
2 Katie Robinson 19


Without the no. field being in a table, i want to form to generate this from a function. so when the user presses tab to enter a third record its number "3" i dont want to link it to a table at all.

-Kleenex
 

Users who are viewing this thread

Back
Top Bottom