Chummly1984
Technical User
Have a quick question.
Here is a code I am using to convert decimal serial numbers into Hex.
Private Sub txtESNdec_AfterUpdate()
left3 = Left([txtESNdec], 3)
right8 = Right([txtESNdec], 8)
hexleft = Hex(left3)
hexright = Hex(right8)
hex_number = hexleft & Right("000000" & hexright,6)
Me.[txtESNhex] = hex_number
Me.txtDateCode.SetFocus
The problem I am having is that on some calculations, the txtESNhex number starts with a 0 (Zero) and its dropping that zero. I need to have that stay, so instead of getting something like B7E12A0, it needs to say 0B7E12A0
I tried the input mask, but that didnt help. I made these text boxes since these ESN's do contain both numbers and letters.
Any help would be much appreciated!!
Here is a code I am using to convert decimal serial numbers into Hex.
Private Sub txtESNdec_AfterUpdate()
left3 = Left([txtESNdec], 3)
right8 = Right([txtESNdec], 8)
hexleft = Hex(left3)
hexright = Hex(right8)
hex_number = hexleft & Right("000000" & hexright,6)
Me.[txtESNhex] = hex_number
Me.txtDateCode.SetFocus
The problem I am having is that on some calculations, the txtESNhex number starts with a 0 (Zero) and its dropping that zero. I need to have that stay, so instead of getting something like B7E12A0, it needs to say 0B7E12A0
I tried the input mask, but that didnt help. I made these text boxes since these ESN's do contain both numbers and letters.
Any help would be much appreciated!!