call the function query

  • Thread starter Thread starter Frank Dulk
  • Start date Start date
F

Frank Dulk

How could I call the function below (decimal conversion for hexadecimal)
starting from a query?
And in a form?

beginning of the function:

Function Dec2Hex(ByVal x As Double) As String
Dim Result As String, i As Integer, Temp As Integer

Result = Hex(Int(x)) & "."
x = x - Int(x)
For i = 1 To 16
x = x * 16
Result = Result & Hex(x)
x = x - Int(x)
Next i
Dec2Hex = Result

End Function

final of the function.
 
thank you

JL said:
Hi Frank,

In Query:
select Dec2Hex(DecimalValue) as HexValue;

In Form:

sub Testing()
.
.
.
HexValue = Dec2Hex(DecimalValue)
.
.
.
.
end sub

Hope this helps.
 
Hi Frank,

In Query:
select Dec2Hex(DecimalValue) as HexValue;

In Form:

sub Testing()
..
..
..
HexValue = Dec2Hex(DecimalValue)
..
..
..
..
end sub

Hope this helps.
 
Back
Top