none
How can you get data type mismatch using the right function? RRS feed

  • Question

  • Driving me crazy....  Code: Right([Title]![text],6)

    I ensured there are no null values... WTH?


    jj

    Monday, April 23, 2018 8:40 PM

All replies

  • Hi,

    Can you post the complete SQL statement? Are you saying the name of your table is "Title" and the name of your field is "text?" I think maybe "text" is a reserved word, so using it as a field name could also cause some problems.

    Monday, April 23, 2018 8:49 PM
  • Right([Title]![text],6) is it....  data looks like "IT Specialist 2201012"

    jj

    Monday, April 23, 2018 11:34 PM
  • The function doesn't know what [Title]![text] refers to. Once again, see the examples in the above.

    How are you using this function? Is this part of a VBA routine or are you attempting to use it in a query or are you attempting to use it as a control source in a form or report?

    Monday, April 23, 2018 11:55 PM
  • Is the bracketed [text] an attempt to refer to the Text property of a control named 'Title'?

    If so, try just using the name of the control:

    Right([Title], 6)
    Also, in what context are you using this?  Is it in VBA code, property sheet, a SQL Statement... ?


    Miriam Bizup Access MVP

    Wednesday, April 25, 2018 6:04 PM