swaroop1012
Registered User.
- Local time
- Today, 17:19
- Joined
- Nov 21, 2008
- Messages
- 19
Hi All,
I have a real big problem with auto incrementing of numbers which must increment on a special case. Its very urgent guys pls help me.
I am here with attaching the database "db1" for clear understanding.
I have around 16 wards with a code assigned for each ward. This data is tabulated in "Wardinfo" table. I designed a form "Main" which has different fields. The main concern here is the "Refno" field which should look like BH-1, Cl-1, BH-2, CA-1 etc.(The first two letters are ward codes)
For this i used the Nz and Dmax functions in after update of Refno field.
My problem here:
first give wardname as Brickhill (BH-1).
Click Saverecord and then add another record.
This time again give wardname as Brickhill (BH-2) and save it.
Next give any another wardname and save it (XX-1).
Now if u give Brickhill again, it should be (BH-3) but its coming up as BH-2.
The same thing happens if u proceed further with any other ward names.
Can anybody help me please.
Thanks in advance.
Ps: I am also attaching another small sample database "DemoAutoIncrementA2000" i got from this forum when i asked the problem before. It works well and i used the same coding and all in my database.
View attachment db1.zip
View attachment DemoAutoIncrementA2000.zip
I have a real big problem with auto incrementing of numbers which must increment on a special case. Its very urgent guys pls help me.
I am here with attaching the database "db1" for clear understanding.
I have around 16 wards with a code assigned for each ward. This data is tabulated in "Wardinfo" table. I designed a form "Main" which has different fields. The main concern here is the "Refno" field which should look like BH-1, Cl-1, BH-2, CA-1 etc.(The first two letters are ward codes)
For this i used the Nz and Dmax functions in after update of Refno field.
My problem here:
first give wardname as Brickhill (BH-1).
Click Saverecord and then add another record.
This time again give wardname as Brickhill (BH-2) and save it.
Next give any another wardname and save it (XX-1).
Now if u give Brickhill again, it should be (BH-3) but its coming up as BH-2.
The same thing happens if u proceed further with any other ward names.
Can anybody help me please.
Thanks in advance.
Ps: I am also attaching another small sample database "DemoAutoIncrementA2000" i got from this forum when i asked the problem before. It works well and i used the same coding and all in my database.
View attachment db1.zip
View attachment DemoAutoIncrementA2000.zip