By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,940 Members | 1,300 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,940 IT Pros & Developers. It's quick & easy.

Auto numbering - some code please

P: 4
Iím a bit of a drag and drop merchant, but this one canít be solved using the wizards. Would someone be kind enough to point me to some code which will allow me to resolve the following:-

My table has three fields Phase, Section and DrawingNo. Iím wishing to record new numbers in the DrawingNo field, when a new Section is added within an existing Phase then assign the next available sequential number or reset to 1 if a new Phase value is added.

Thanks

Using Access 2000
Sep 28 '06 #1
Share this Question
Share on Google+
3 Replies


PEB
Expert 100+
P: 1,418
PEB
Hi,

U need this in form or in table or a query?

In table in Access It seems a bit impossible coz there isn't the kind of triggers that maybe u are looking for...

:)
Sep 30 '06 #2

P: 4
Hi,

U need this in form or in table or a query?

In table in Access It seems a bit impossible coz there isn't the kind of triggers that maybe u are looking for...

:)
Hi,

The input will be via a form
Oct 3 '06 #3

PEB
Expert 100+
P: 1,418
PEB
Ok,

So..


In your form...
Go to your control named Phase

After update event procedure for phase:
Me!DrawingNo=1

After update event procedure for Section:
Me!DrawingNo=nz(Dcount("DrawingNo","YourTable","Se ction='"+Me{Section}+"'"))+1



Best regards
Oct 7 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.