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

Handling Hex Values

P: n/a
We have a database that collect serial numbers. These serial numbers
are input into the database as a string value (only the engineers know
its hex). Anyways what they would like to have happen is that the
serial number remain as hex but based on the entry increment a
quantity automatically so that only one number must be input to get
many entries made. Any suggestions?
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Here is an example of a function that reads a hex string and generates
values for the number of entries required. Example useage:
? HexIncr("1FF0", 16)

Function HexIncr(strStartHexValue As String, lngHowMany As Long)
Dim lngI As Long
Dim lngStartValue As Long

lngStartValue = CLng("&H" & strStartHexValue)
For lngI = lngStartValue To lngStartValue + lngHowMany - 1
Debug.Print Hex(lngI)
Next
End Function

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"sherah" <sh*****@fleetwoodgroup.com> wrote in message
news:40**************@news.egl.net...
We have a database that collect serial numbers. These serial numbers
are input into the database as a string value (only the engineers know
its hex). Anyways what they would like to have happen is that the
serial number remain as hex but based on the entry increment a
quantity automatically so that only one number must be input to get
many entries made. Any suggestions?

Nov 12 '05 #2

P: n/a
Thanks very much!
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.