Tom
thank you very much and It's working now
--
Suren
On Jan 31, 2007, at 4:34 PM, Tom Elliott wrote:
Suren,
Sorry - I missed that detail
Change the auto-enter calc to
If ( Isempty ( YourTable2::CitySerialNumber ) ; 1 ; Max
( YourTable2::CitySerialNumber) + 1 )
I think that should do it
cheers
Tom
On 31 Jan 2007, at 21:25, Suren Thambirajah wrote:
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
------------------------------------------------------------------------
---------------------------