+ Reply to Thread
Results 1 to 10 of 10

solving a type mismatch in expression" error

  1. #1
    Forum Contributor
    Join Date
    09-10-2010
    Location
    Sanford, FL
    MS-Off Ver
    Excel 2016 Office 365
    Posts
    105

    solving a type mismatch in expression" error

    In a simple database I get the error message "type mismatch in expression" each time I attempt to run a report. I tried to attach the database to this thread but it says invalid file. It appears that access file are not valid file extensions for this forum? It is not a friendly access evening for me. Any suggestions on resolving the error would be appreciated.
    Last edited by Juli; 04-20-2019 at 11:46 PM. Reason: Title not correct format-corrected

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: solving a type mismatch in expression" error

    Sanitize your file so that there is no sensitive information. Run a compact and repair. Zip the file and then upload it. Remember, we do not need 100% of the data, only a representative amount to show what is happening.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    09-10-2010
    Location
    Sanford, FL
    MS-Off Ver
    Excel 2016 Office 365
    Posts
    105

    Re: solving a type mismatch in expression" error

    Thank You Alan- It appears the file is now attached.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: solving a type mismatch in expression" error

    Your issues are the relationships. In your query you are linking Patients First Name with the Provider, the Nurse First Name with the date admitted. This needs to be resolved to get the correct relationships established. Look at all your relationships and fix them so that they make sense. You have mismatched names and numbers (ID). This all need to be consistently applied. I have not listed all the issues, just the general scheme in the relationships. Your queries need to work for the reports to work as they are the record source for the reports.

  5. #5
    Forum Contributor
    Join Date
    09-10-2010
    Location
    Sanford, FL
    MS-Off Ver
    Excel 2016 Office 365
    Posts
    105

    Re: solving a type mismatch in expression" error

    So I tried to correct the relationships and now one of the reports works fine. I no longer get the error, but the data wont populate for the "provider" report. I tried to see how I can change that relationship and cant see what I am missing. I am looking at the query as maybe that is where the error id now. (Leave it to me to fix one error and cause another).
    Attached Files Attached Files

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: solving a type mismatch in expression" error

    Your provider IDs in the two tables contain no matches. Look at the IDs. They are not the same.

  7. #7
    Forum Contributor
    Join Date
    09-10-2010
    Location
    Sanford, FL
    MS-Off Ver
    Excel 2016 Office 365
    Posts
    105

    Re: solving a type mismatch in expression" error

    That was something I should have noticed right away. I reentered the Provider numbers to match. I keep going back to your post about the relationships. I have deleted and reentered them several times and clearly I am missing something. You indicated I was linking Patients First Name with the Provider, the Nurse First Name with the date admitted. I cant see that (and it wasn't my intent. I tried to create a relationship between providers and patient records, patients and patient records and nurses and patient records. The nurse connection works fine but the provider connection does not tho I keep trying to do it the same way. I am so sorry I am likely missing the obvious?
    Attached Files Attached Files
    Last edited by Juli; 04-21-2019 at 03:37 PM.

  8. #8
    Forum Contributor
    Join Date
    09-10-2010
    Location
    Sanford, FL
    MS-Off Ver
    Excel 2016 Office 365
    Posts
    105

    Re: solving a type mismatch in expression" error

    I have been working on the relationships and now have the second query to work. So two out of three... The patient provider query wont populate. I don't know if the error remains in the relationship or if I am designing the query incorrectly.
    Attached Files Attached Files

  9. #9
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: solving a type mismatch in expression" error

    In that query, you have the Medical Records ID in the patients table linked to Nurse ID in the Nurses table. I think that you need to link the Medical Records ID in the Patients Table to the Patients Record Table.

  10. #10
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: solving a type mismatch in expression" error

    Glad that you solved this and thanks for the REP.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] "ByRef:mismatch" and "Constant Expression Required" Errors
    By Mishil in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-10-2015, 06:47 PM
  2. [SOLVED] Code displays error message reading "type mismatch"
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-12-2014, 09:32 AM
  3. Excel 2010 (Run-time error '13' type mismatch) "Debug" and "Continue" Grayed out.
    By Jeronimo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2012, 06:42 PM
  4. [SOLVED] VBA Excel 2007 : Autofit Merge Cells Error "Run-time error '13': Type Mismatch"
    By Hudas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-18-2012, 04:10 PM
  5. Replies: 5
    Last Post: 08-08-2010, 03:03 PM
  6. [SOLVED] Merged cells cause "Runtime error 13 type mismatch" problem
    By Ralph Malph in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2006, 08:55 AM
  7. Error Handling to mitigate "Run Time Erorr 13 Type Mismatch"
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2005, 09:05 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1