Formatting a # to auto + 1 when adding new info- not autonumber th

  • Thread starter Thread starter sarahz11
  • Start date Start date
S

sarahz11

Hi all~

Sorry I am slow with all this and don't know VBA...I have a table that
currently has a field name "CI#" with the data type as "number" with a format
of "0000"- when I enter items into the form based on this table, I always
manually enter the numbers (the numbers are YYNN)...I would like it to
automatically add "+1" to it. I understand from reading changing this to
autonumber is bad. So how do I do this?

Thank you so much,

Sarah
 
Sarah

Search on-line for "Custom Autonumber".

The general gist is that you'll have Access find the largest existing value,
then add one to that to get the next sequence number...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
Hi Sarah,
I have a table that currently has a field name "CI#" with....

My advise is to avoid the use of special characters (# signs, spaces, etc.)
and reserved words for anything that you assign a name to within Access.

Special characters that you must avoid when you work with Access databases
http://support.microsoft.com/?id=826763

Problem names and reserved words in Access
http://allenbrowne.com/AppIssueBadWord.html

Try this sample, from Roger's Access Library:
http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=395


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________
 
Back
Top