(Solved) – VBA and bitwise operation on decimal data type (Access-365)


Jet Engine DB dosen’t support internal “AND” bitwise operation.

VBA does it but i try it only with “classical” data type (including double).

I need a larger bit mask and an “and” bitwise operation.

But when I try to perform this operation I obtain an overflow error. Some suggestions without change the BigInt database data type?

…It seems like And operator don’t support decimal data type. Is it possible?

Public Function AndBitABit(variabile, riferimento)
AndBitABit = variabile and riferimento
'with same results

'variabile = CDec(variabile)
'riferimento = CDec(riferimento)
'AndBitABit = variabile and riferimento

'AndBitABit = cdec(variabile and riferimento)

'dim v

‘v = variabile and riferimento

‘v = (variabile and riferimento)<>0

End Function

Leave a Reply

Your email address will not be published. Required fields are marked *