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

(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

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

'2)
'AndBitABit = cdec(variabile and riferimento)

'3)
'dim v

‘v = variabile and riferimento

‘4)
‘v = (variabile and riferimento)<>0

End Function

Leave a Reply

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