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

Add 1 to Serial Number

P: n/a
It's kicking my butt. All I want to do is add 1 to each new records I add
to my table using a form. The serial number is in the form 0001, 0002, 0003
etc, and increments for each record. If I enter the value in the table
directly it retains the leading zero's however if I use the dmax function
and add one to it it's store as 1, 2, 3 etc. I'm stumped. Can I do this as
a default value in the table? Any advice is appreciated. Thanks in advance
for you time!

--
Reggie

www.smittysinet.com
----------
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Reggie" <no**********@smittysinet.com> wrote in message
news:vc********************@comcast.com...
It's kicking my butt. All I want to do is add 1 to each new records I add
to my table using a form. The serial number is in the form 0001, 0002, 0003
etc, and increments for each record. If I enter the value in the table
directly it retains the leading zero's however if I use the dmax function
and add one to it it's store as 1, 2, 3 etc. I'm stumped. Can I do this as
a default value in the table? Any advice is appreciated. Thanks in advance
for you time!


Just store it as a number (in a numeric field) and use a format to *display* the
leading zeros. Otherwise use your DMax() but wrap it in a Format() function to
add the leading zeros on before storing it.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2

P: n/a
Got it. Thanks for the quick response.

--
Reggie

www.smittysinet.com
----------
"Rick Brandt" <ri*********@hotmail.com> wrote in message
news:2i************@uni-berlin.de...
"Reggie" <no**********@smittysinet.com> wrote in message
news:vc********************@comcast.com...
It's kicking my butt. All I want to do is add 1 to each new records I add to my table using a form. The serial number is in the form 0001, 0002, 0003 etc, and increments for each record. If I enter the value in the table
directly it retains the leading zero's however if I use the dmax function and add one to it it's store as 1, 2, 3 etc. I'm stumped. Can I do this as a default value in the table? Any advice is appreciated. Thanks in advance for you time!
Just store it as a number (in a numeric field) and use a format to

*display* the leading zeros. Otherwise use your DMax() but wrap it in a Format() function to add the leading zeros on before storing it.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.