473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Add 1 to Serial Number

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
2 2418
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Gavin | last post by:
Hi, I'm a newbie to programming of any kind. I have posted this to other groups in a hope to get a response from anyone. Can any one tell me how to make my VB program read the Bios serial number...
15
by: tom | last post by:
Hi, How do I get the serial number of the harddisk in .NET? I want this to be the same number even if the user has reformatted, so I do not want the volume serial number. Thanx, t
5
by: | last post by:
Hi, Do memory sticks have serial numbers like harddrives? If so how can I get this, I want to uniquely identify a memory stick (removable drive) for authentication. Thanks
79
by: Klaus Bonadt | last post by:
In order to protect software from being copied without licence, I would like to use something like a key, which fits only to the current system. The serial number of the CPU or the current...
1
by: Darren DeCoste | last post by:
I am trying to create an application in Access that I will be able to print bar code labels. A stumbling block that I have hit is the Serial Number on the bar code. I would like to be able to read...
3
by: Stewart Allen | last post by:
Hi there I'm trying to find part serial numbers between 2 numbers. The user selects a part number from a combo box and then enters a range of serial numbers into 2 text boxes and the resulting...
3
by: Mark Harris | last post by:
I have an installer which uses a Customer Information page in it, is there an easy way to pass the serial number entered to a custom action? If not, where would i find the serial number in the...
14
by: Lauren Wilson | last post by:
Discovered this interesting comment on MSDN: "To programmatically obtain the hard disk's serial number that the manufacturer assigns, use the Windows Management Instrumentation (WMI)...
9
by: Nebojsa4 | last post by:
Hi. First, sorry on my weak English to all. Qusetion: How to read (in VB) Manufacturer serial number of Hard disk drive? Not volume/serial number of C:, D:, etc. partitons. For reading...
6
by: Paul Bromley | last post by:
Ok - I have given up on trying to find the active IP address for a given PC. For licensing purposes I need to retrive a unique identifier from the PC that the program is installed on. The Hard disk...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.