Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
1.00/5 (6 votes)
See more:
iam Hardly disappointed for this form no body have any answer rather helping me passing Comment and give me the links , links are available on google also but i tired that why i post this on this form if i have to read the links why iam wasting my time here these people don't understand this is not the link sharing Form this is to help right to point solution making fool people there senior so called programmer attitude of the people here is so bad , i firstly said in my qustion that those who don't know kindly don;t send me the links or passing comments. provideing salution they feel bad,

This is my Question that i was posted yesterday

i have Table Journal Voucher

V_No Primary Key Define And Set AutoNumber

i have to define my own Autonumber Like

For Example
DateShowToday
JV-30Aprl2011-00001
JV-30Aprl2011-00002
JV-30Aprl2011-00003
JV-30Aprl2011-00004
JV-30Aprl2011-00005

Kindly not Send Me the Links Solution Required
Posted

Your field appears to comprise three sub-fields - a two character code (JV in your example) a date (30aprl2011 in your example) and an autonumber field - so ou could use access autonumber field, together with two other fields (the code and the date) to build the field you require - use a 'view' if you need to to present that field.

If you really want the numbering to restart at 1 for every date or code change then you will have to program it yourself - by finding the maximum value of the field for the existing code and date, then adding one two the 'counter' portion at the end

you could use something like
select max(field) from table where field like 'JV-30Aprl2011-*'


I don't recall the Access syntax off the top of my head - but you should get the idea.

I was going to send a link to an Access program that did almost exactly what you wanted - but you asked for no links, so there you go.
 
Share this answer
 
Well, you are really encouraging people to help you with comments like this. Try asking a reasonable question in polite terms rather than demanding an answer and telling people what to do and what not to do. After all, you are not paying for this service.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900