Results 1 to 2 of 2

Thread: type casting in access

  1. #1
    Guest
    Hi,
    Does anyone know if it's possible to compare a text field with a number field in access, by using some kind of toString function?

    Cheers.

  2. #2
    Addicted Member
    Join Date
    May 2000
    Location
    London Occupation: Desktop Developer
    Posts
    141

    Type Conversion functions

    Look up the help on type conversion functions...

    Cstr(expression) will convert a numeric type to a string there are numerous others however in the on-line help.

    I am guessing here but what type of comparison are you making Ascii or numeric?

    I have also found the eval(expression) function extremely useful in this area.

    debug window example:

    ?"1+1" --> "1+1"

    ?eval("1 + 1") = 2 --> true

    Hope this helps, perhaps provide more info if it does'nt.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width