Results 1 to 5 of 5
  1. #1
    lawdy is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jan 2013
    Posts
    172

    Run time error'13' Type mismatch

    On my form, I have a field cboSelectWhat with a row source of SELECT DISTINCT [fTxtPropertyName] & " -" & CStr([fLngPropertyNumber]) AS fBoth, tblProperties.fTxtPropertyAddress, tblProperties.fTxtPropertyCityFROM tblProperties; and the (short version) table contains:




    fLngPropertyNumber fTxtPropertyName fTxtPropertyAddress fTxtPropertyCity
    1141 Meadowcreek Village Apartments 933 Bruton Road Mesquite
    1142 Kmart 3601 W. Northgate Irving
    1143 Kmart 151 Meadowview Court Terrell
    1144 Kmart Northwest And Abrams Dallas
    1145 Medical Arts Building Garage 1307 8th Avenue Fort Worth



    The problem is; I want to be able to type in the property name to select the property. Then I need the property number to filter it because there are properties with the same name but different address. I can separate the number. The code above works as a query, but does NOT work when used as row source. I hope this is clear to you. Any help is appreaceted.

  2. #2
    lawdy is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jan 2013
    Posts
    172
    I failed to mention that I get the 'Type mismatch' when I run it as row source.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    What exactly is the fTxtPropertyName for properties with numbers 1142, 1143,1144?
    Show us the design of tblProperties.

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Why isn't the autonumber the first field, and the fboth the displayed field?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    I don't see the need for the type conversion function, but you get this error when? Upon form opening? When you try to enter data? Is anything highlighted or mentioned in a way that tells you which field raises the error?
    I want to be able to type in the property name
    Where? In the combo I presume.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. run-time error 13; type mismatch
    By osupratt in forum Programming
    Replies: 16
    Last Post: 10-11-2016, 02:40 PM
  2. Run-time error 13: type mismatch
    By ehe in forum Programming
    Replies: 3
    Last Post: 01-13-2013, 12:58 AM
  3. run-time error '13' type mismatch
    By teebumble in forum Forms
    Replies: 8
    Last Post: 12-03-2012, 01:18 PM
  4. run-time error 13 , type mismatch
    By Compufreak in forum Programming
    Replies: 8
    Last Post: 08-13-2012, 12:17 AM
  5. Run-time error '13': Type mismatch
    By uronmapu in forum Access
    Replies: 2
    Last Post: 07-10-2012, 07:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums