ProgrammingMSAccess.com

Learn about Developers Group
Join Developers Group
Order SPAM Blocker
Free Stuff
Guest Book
.NET Resources
SQL Server Resources
Favorites
Technical Support
Books & DVDs by Webmaster
Articles, tutorials, & more
FAQs
Product Reviews
Samples
Prior Newsletters
Contact Us
Home
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

a pair of vba procedures that demonstrate the ability to do arithmetic with hex numbers

Sub callhextest()

hextest 16, 16

End Sub

Sub hextest(firstarg, secondarg)
Dim firsthex, secondhex, newarg, newhex, newconv, convhex

'If firstarg = 16 and secondarg = 16, then
'firsthex and secondhex = "10"
firsthex = Hex(firstarg)
secondhex = Hex(secondarg)
Debug.Print firstarg, firsthex
Debug.Print secondarg, secondhex

'newarg = 32
newarg = firstarg + secondarg

'newhex = 20
newhex = Hex(newarg)
Debug.Print newarg, newhex

'newconv = 90 or 5*16 + 10
newconv = 90
convhex = Hex(newconv)
Debug.Print newconv, convhex

End Sub

Want to understand  Microsoft Access 2000/2002/2003 so that you can program it to do more tasks like this?  Get Programming Microsoft Office Access 2003 by Rick Dobson from Microsoft Press.  Learn more about the book by clicking here.

Copyright 2003 CAB, Inc. All rights reserved. Republication or redistribution of CAB, Inc. content, including by framing or similar means, is expressly prohibited without the prior written consent of CAB, Inc. CAB, Inc. shall not be liable for any errors in the content, or for any actions taken in reliance thereon.