Mac Addressing

T

Tom M

Hello. I new to the newsgroup, and hoping you can help.

I'm not sure how I should create a table to store MAC
address. i.e. A6-3D-CE-65-12-3F and how do I limit the
charcters to only 0 1 2 3 4 5 6 7 8 9 A B C D E F

any help would be appreciated

Thank you Tom
 
P

PC Datasheet

Tom,

Hexidecimals are limited to 0-9 and A to F so maybe you could work that in
somehow. Also, the ascii value of 0 to 9 is 48 - 57 and the ascii value of A to
F is 65 to 70 so maybe you could use the Asc function and work that in somehow.


--
PC Datasheet
A Resource for Access, Excel and Word Applications
(e-mail address removed)
www.pcdatasheet.com

· Design and basic development for new applications
· Additions, Modifications and "Fixes" for existing applications
· Mentoring for do-it-yourselfers who want guidance
· Complete application design and development
· Applications Using Palm Pilot To Collect Data And
Synchronize The Data Back To Access Or Excel
 
R

Ron Weiner

Here is a simple way to do this. When the user types an invalid hex value
the text box ignores it. All of the logic is wrapped up in the instr()
function.

Private Sub Text0_KeyPress(KeyAscii As Integer)
If InStr("0123456789ABCDEFabcdef", Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End Sub

Ron W
 
T

Tom M

Thank you for your advise.

This looks like it will do what I need..Again Thank you

Tom
 
T

Tom M

Ron W
This works fine, except, how can I allow the Backspace key
and the delete key?

Thank you

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top