Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2004
    Bangor, ME USA

    Question Unanswered: Type mismatch on a search, how can I fix it?

    I have a function that does work on 6 of 7 searches, it's the 7th one I did not count on.

    My function is used to search 7 different tables depending on which search screen the user is on. I have all as text fields on the six that work, the seventh one has a numerical field that produces a type mismatch when nothing is filled in (it should produce a case 0 [no data entered error message]).

    I can not change to a variant data type because the number is a PK for the tables and associated subforms. Using a variant causes all records to be displayed (I do not want this.

    is there a way to make a number a string without having to change the datatype?

    Any help greatly appreciated.
    P.S. This group has already fixed two problems I had this past month. KUDOS!

  2. #2
    Join Date
    Nov 2003
    You can use the CStr() function to change to string or you can use the Nz() function in case there is Null. See Access Help.

Posting Permissions

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