call the function query

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.
 
F

Frank Dulk

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.
 
G

Guest

Hi Frank,

In Query:
select Dec2Hex(DecimalValue) as HexValue;

In Form:

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

Hope this helps.
 

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