Data Type Mismatch in Criteria Expression


V

Vylent Fyre

I'm at a complete loss right now in trying to decipher what is causing this
error. I have started the queries over from scratch and still get this. I'm
sure it's an obvious answer; I'm just not able to pin point it right now. I
am trying to, ultimately, in a 3rd or 4th query after this one (this is 2nd
one) to get a sum from a particular expression, but first I need to get this
to not get this error. There's nothing being summed in this query; just all
grouped by for now. Below is the SQL for this query (the 1st query it's
pulling information from is qry_ARI Future Pmts_1st) -



SELECT [Month Booked], Client, Vehicle, Div, Yard, [Bill Client Data], [In
Service], [Rental Amt], [Interest Amt], [Tax Amt], [Mgmt Fee], [Ins Fee],
[Total Billed], [Invoice Number], [Invoice Date], [Cap Cost], [Book Value],
[Mos Bill], [1st Bill], [Last Bill], [CLIENT DATA1], VIN, [Lease Term], [AFE
Number], [Term Payment], [Admin Fee], [Curr Cap Cost], [Curr Interest],
[Total Payment Forward], [1st Pmt Date Long Org], [Last Pmt Date Long Org],
[1st Pmt Date Long], [Last Pmt Date Long], [1st Pmt Date Month], [Last Pmt
Date Month], [1st Pmt Date Year], [Last Pmt Date Year], [1st Pmt Date], [Last
Pmt Date]
FROM [qry_ARI Future Pmts_1st]
GROUP BY [Month Booked], Client, Vehicle, Div, Yard, [Bill Client Data], [In
Service], [Rental Amt], [Interest Amt], [Tax Amt], [Mgmt Fee], [Ins Fee],
[Total Billed], [Invoice Number], [Invoice Date], [Cap Cost], [Book Value],
[Mos Bill], [1st Bill], [Last Bill], [CLIENT DATA1], VIN, [Lease Term], [AFE
Number], [Term Payment], [Admin Fee], [Curr Cap Cost], [Curr Interest],
[Total Payment Forward], [1st Pmt Date Long Org], [Last Pmt Date Long Org],
[1st Pmt Date Long], [Last Pmt Date Long], [1st Pmt Date Month], [Last Pmt
Date Month], [1st Pmt Date Year], [Last Pmt Date Year], [1st Pmt Date], [Last
Pmt Date];
 
Ad

Advertisements

O

Ofer Cohen

What happen when you run [qry_ARI Future Pmts_1st] query separetly?
Mybe the problem is with this query
 
Ad

Advertisements

V

Vylent Fyre

Thanks for the reply, Ofer! I appreciate it :)

The 1st query runs fine, with no issues. I have the Totals option on in
there and it works great...

I've redone all the queries, once again, and now I get an error I've never
had before which is "The decimal field's is too small to accept the numeric
you attempted to add." Never seen this error before... Does anyone know what
this mean? Keep in mind all I have currently set is "Group by" - there is
nothing being summed at this time.... Below is the SQL for the 2nd query -


SELECT [Month Booked], Client, Vehicle, Div, Yard, [Bill Client Data], [In
Service], [Rental Amt], [Interest Amt], [Tax Amt], [Mgmt Fee], [Ins Fee],
[Total Billed], [Invoice Number], [Invoice Date], [Cap Cost], [Book Value],
[Mos Bill], [1st Bill], [Last Bill], [CLIENT DATA1], VIN, [Lease Term], [AFE
Number], [Term Payment], [Admin Fee], [Curr Cap Cost], [Curr Interest],
[Total Payment Forward], [1st Pmt Date Long Org], [Last Pmt Date Long Org],
[1st Pmt Date Long], [Last Pmt Date Long], [1st Pmt Date Month], [Last Pmt
Date Month], [1st Pmt Date Year], [Last Pmt Date Year], [1st Pmt Date], [Last
Pmt Date], IIf([Month Booked]=[1st Pmt Date Long] Or [Month Booked]>[1st Pmt
Date Long],IIf([Month Booked]<[Last Pmt Date Long],[Total Payment
Forward]*[Current Mos Billed],0)) AS [Total Paid], IIf([Total Paid]>0,[Cap
Cost]-[Total Paid],0) AS [Total Amount Left], IIf([Last Pmt Date
Year]="2007",[Total Amount Left],0) AS [2007 Year Total], IIf([Last Pmt Date
Year]="2008",[Total Amount Left],0) AS [2008 Year Total], IIf([Last Pmt Date
Year]="2009",[Total Amount Left],0) AS [2009 Year Total], IIf([Last Pmt Date
Year]="2010",[Total Amount Left],0) AS [2010 Year Total], IIf([Last Pmt Date
Year]="2011",[Total Amount Left],0) AS [2011 Year Total], IIf([Last Pmt Date
Year]="2012",[Total Amount Left],0) AS [2012 Year Total], IIf([Month
Booked]=[1st Pmt Date Long] Or [Month Booked]>[1st Pmt Date Long] And [Month
Booked]<[Last Pmt date Long],[Lease Term]-[Current Mos Billed],0) AS [Mos
Rmng]
FROM [qry_ARI Future Pmts_1st]


Thanks again, everyone! :)

VF

Ofer Cohen said:
What happen when you run [qry_ARI Future Pmts_1st] query separetly?
Mybe the problem is with this query

--
Good Luck
BS"D


Vylent Fyre said:
I'm at a complete loss right now in trying to decipher what is causing this
error. I have started the queries over from scratch and still get this. I'm
sure it's an obvious answer; I'm just not able to pin point it right now. I
am trying to, ultimately, in a 3rd or 4th query after this one (this is 2nd
one) to get a sum from a particular expression, but first I need to get this
to not get this error. There's nothing being summed in this query; just all
grouped by for now. Below is the SQL for this query (the 1st query it's
pulling information from is qry_ARI Future Pmts_1st) -



SELECT [Month Booked], Client, Vehicle, Div, Yard, [Bill Client Data], [In
Service], [Rental Amt], [Interest Amt], [Tax Amt], [Mgmt Fee], [Ins Fee],
[Total Billed], [Invoice Number], [Invoice Date], [Cap Cost], [Book Value],
[Mos Bill], [1st Bill], [Last Bill], [CLIENT DATA1], VIN, [Lease Term], [AFE
Number], [Term Payment], [Admin Fee], [Curr Cap Cost], [Curr Interest],
[Total Payment Forward], [1st Pmt Date Long Org], [Last Pmt Date Long Org],
[1st Pmt Date Long], [Last Pmt Date Long], [1st Pmt Date Month], [Last Pmt
Date Month], [1st Pmt Date Year], [Last Pmt Date Year], [1st Pmt Date], [Last
Pmt Date]
FROM [qry_ARI Future Pmts_1st]
GROUP BY [Month Booked], Client, Vehicle, Div, Yard, [Bill Client Data], [In
Service], [Rental Amt], [Interest Amt], [Tax Amt], [Mgmt Fee], [Ins Fee],
[Total Billed], [Invoice Number], [Invoice Date], [Cap Cost], [Book Value],
[Mos Bill], [1st Bill], [Last Bill], [CLIENT DATA1], VIN, [Lease Term], [AFE
Number], [Term Payment], [Admin Fee], [Curr Cap Cost], [Curr Interest],
[Total Payment Forward], [1st Pmt Date Long Org], [Last Pmt Date Long Org],
[1st Pmt Date Long], [Last Pmt Date Long], [1st Pmt Date Month], [Last Pmt
Date Month], [1st Pmt Date Year], [Last Pmt Date Year], [1st Pmt Date], [Last
Pmt Date];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top