thank you very much tom,
It's working but
serial number field as a default nothing in it. so I put ether 0 or 1
it' ok
how do I do the script first time I need to put "1" then on it will
work.
--
suren
On Jan 31, 2007, at 3:54 PM, Tom Elliott wrote:
Suren
1. in the relationships graph create a copy of the table (YourTable2)
2. create a relationship between the two tables based on City
(YourTable::City=YourTable2::City)
3. create a number field (CitySerialNumber) with auto-enter calc:
Max ( YourTable2::CitySerialNumber) + 1
this calc must be evaluated in the context of YourTable
and "Do not replace field contents" must be UNchecked
NB: If a record is deleted it's serial number will NOT be replaced
(unless it was the last record created for that city)
cheers
Tom
On 31 Jan 2007, at 18:23, Suren Thambirajah wrote:
HI,
I have a small DB. I have field call “City” and it’s got 13 plus
cities.
Now I’m trying to crate serial number base on city every time I
crate a new record.
If I have choose Ottawa I want the serial number 1, 2, 3, 4, 5 etc.
If I choose Montréal should be 1, 2, 3, 4, etc.
How can I do that?
--
Suren
---
Mr. Suren Thambirajah
IT System Administrator
Paul Daoust Construction Canada Ltd.
"WE'LL MAKE YOUR CONSTRUCTION CONCERNS FADE AWAY"
5424 Canotek Road
Ottawa, ON, K1J 1E9
T: (613) 733-1694 ext.216
F: (613) 733-1696
E: [EMAIL PROTECTED]
www.dc.ca
------------------------------------------------------------------------
---------------------------
Confidentiality Warning: This message and any attachments are
intended only for the use of the intended recipient(s), are
confidential, and may be privileged. If you are not the intended
recipient, you are hereby notified that any review, retransmission,
conversion to hard copy, copying, circulation or other use of this
message and any attachments is strictly prohibited. If you are not
the intended recipient, please notify the sender immediately by
return e-mail, and delete this message and any attachments from your
system. Thank you.
Information confidentielle: Le présent message, ainsi que tout
fichier qui y est joint, est envoyé à l'intention exclusive de son ou
de ses destinataires; il est de nature confidentielle et peut
constituer une information privilégiée. Nous avertissons toute
personne autre que le destinataire prévu que tout examen,
réacheminement, impression, copie, distribution ou autre utilisation
de ce message et de tout fichier qui y est joint est strictement
interdit. Si vous n'êtes pas le destinataire prévu, veuillez en
aviser immédiatement l’expéditeur par retour de courriel et supprimer
ce message et tout document joint de votre système. Merci.
------------------------------------------------------------------------
---------------------------