hasru Posted December 7, 2005 Share Posted December 7, 2005 i trying to make a calculation in a auto enter serial number. what i tried to solve is how to split the serial number in the auto serial that was create by different location or different district. example..if person at district A enter the record the serial number look as A0001 then person at district B enter a new record, the field's number looks B0001 and person at district C enter a new record, the field looks C0001. When person at district A again enter at new record, the field looks A002 and so on...that means the serial number should be the same numbers at every district but with the different character infront the number. hopefully everyone can understand my english. tq Link to comment Share on other sites More sharing options...
aaa Posted December 7, 2005 Share Posted December 7, 2005 Do it by script: When you create new record, first find all records for this: "A" or "B" or "C", then go to last record and increment serial number. This is one of ways, i am sure there must be many ways to do it. Link to comment Share on other sites More sharing options...
hasru Posted December 8, 2005 Author Share Posted December 8, 2005 i tried but still not works. please explain in detail. Link to comment Share on other sites More sharing options...
SlimJim Posted December 8, 2005 Share Posted December 8, 2005 Hi Hasru The sample file here shows you another method without a script. The sample has one table with two fields District and ID. The Id is set up to auto-eneter when District has been chosen. DistrictID.zip Link to comment Share on other sites More sharing options...
hasru Posted December 9, 2005 Author Share Posted December 9, 2005 tq for sending file but the sample file cannot create a new record to test. pls make all fields can be copy and be reuse for my task. tq Link to comment Share on other sites More sharing options...
hasru Posted December 9, 2005 Author Share Posted December 9, 2005 THANK YOU, IT WORKS 100%. I CAN SLEEP WELL TONIGHT Link to comment Share on other sites More sharing options...
hasru Posted December 10, 2005 Author Share Posted December 10, 2005 hi again i thaught i can sleep well but i can't. i tried recreate table by copying your fields. Field District and Field ID. i still dont know why it wont run as yours. my record appears like this. district A A0001 District A A0002 District A A0002 District A A0002 District B B0001 District B B0002 District B B0002 that's mean the auto number just running 0001 to 0002 only and not counting. Link to comment Share on other sites More sharing options...
SlimJim Posted December 10, 2005 Share Posted December 10, 2005 This looks like the sorting in the relationship of District to District has not been applied. The reason this method works is that you match district to district and then sort the related values by ID descending this make the first related record have the largest ID number and hence you can produce the next one by incrementing. I guess that in your case you have either not sorted by ID or you have sorted ascending. Link to comment Share on other sites More sharing options...
hasru Posted December 10, 2005 Author Share Posted December 10, 2005 i surender awhile. here i post to u and pls make a post mortem of what im doing. data.zip Link to comment Share on other sites More sharing options...
hasru Posted December 10, 2005 Author Share Posted December 10, 2005 At last it running very well. tq for helping Link to comment Share on other sites More sharing options...
hasru Posted February 3, 2006 Author Share Posted February 3, 2006 i have to login again to ask some helps. i used almost a month above calculation to auto serial number for different users. i realised that its do not working well in multi user enviroment.the number comes duble and tripple also. is there any way to make it works well in multiuser enviroment. thanks Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6651 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now