Results 1 to 2 of 2

Thread: Data Mismatch type
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Sep 2015
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Data Mismatch type

    Hi Guys someone made an Access database before i arrived and has now left, it was working before but now i get "Data mismatch type" and i have NO idea why it has stopped working. Could someone please help me the SQL is below.


    SELECT Val([RAW_AR_Data_Table]![Account]) AS Account, IIf([RAW_AR_Data_Table]![Assignment]="",Val([RAW_AR_Data_Table]![Document Number]),IIf(Len([RAW_AR_Data_Table]![Assignment])<10,Val(0),Val([RAW_AR_Data_Table]![Document Number]))) AS [Invoice Document Number], RAW_AR_Data_Table.[Document currency], RAW_AR_Data_Table.[Amount in doc curr], RAW_AR_Data_Table.[Local Currency], RAW_AR_Data_Table.[Amount in local currency], RAW_AR_Data_Table.Text, RAW_AR_Data_Table.[Net due date], RAW_AR_Data_Table.[Document Date], IIf([RAW_AR_Data_Table]![Net due date]>Now(),0,DateValue(Now())-([RAW_AR_Data_Table]![Net due date])) AS [Age Uncleared] INTO RAW_AR_Data_Reformat_Table
    FROM RAW_AR_Data_Table
    WHERE (((IIf([RAW_AR_Data_Table]![Assignment]="",Val([RAW_AR_Data_Table]![Document Number]),IIf(Len([RAW_AR_Data_Table]![Assignment])<10,Val(0),Val([RAW_AR_Data_Table]![Document Number]))))>0) AND ((RAW_AR_Data_Table.[Document Type]) Like "RV"));

  2. #2
    Board Regular Darren Bartrup's Avatar
    Join Date
    Mar 2006
    Location
    Nottingham (UK)
    Posts
    1,258
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Data Mismatch type

    Check the Account, Document Number and Net Due Date fields. When using VAL a Data Type Mismatch error is returned if the field is NULL (don't think it does if it's text rather than a number - just returns 0).
    If the query was working previously it's more likely to be some rubbish in the data.
    Using Office 2003 & 2010,

    I'm 1 of the 10 people that don't understand binary. Guess that means the other 1001 do.

    No answer to your post?
    Get someone to read it - does it make sense or does it sound like gibberish?

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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