Link to home
Start Free TrialLog in
Avatar of barleyfreak
barleyfreak

asked on

convert text field to number

I have an access linked table to a a sql table and it lists an order qty field as text, even though it is decimal in the sql table.  I am trying to round down (or int) in access but it won't because it is a text field.  I cannot find the right command to convert the text field in the query to number.

Thanks,
dave
Avatar of Arthur_Wood
Arthur_Wood
Flag of United States of America image

If IsNumber(TextField) then
    Value = cInt(TextField)
End If

Like that?

AW
maybe the function is

IsNumeric(TextField)

AW
ASKER CERTIFIED SOLUTION
Avatar of GreymanMSC
GreymanMSC

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of barleyfreak
barleyfreak

ASKER

thank you,

  Iif(IsNumeric(TextField), CInt(TextField), 0)

did the trick.

cheers,
dave