How to convert Hex to Decimal in Access queries ?

A

Allen Browne

Prefix the hex value with &H, and use Val() to get the value as a decimal:
Val("&H" & [YourHexField])
 
Joined
Jun 6, 2011
Messages
2
Reaction score
0
Sorry. I see what happened here - used an Oh instead of a zero.

However, it did return 715, so I think CINT("&H" & [YourHexField]) works better. It returns an error if the HEX is invalid.
 

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