ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Q on Entering a Criteria within a Query (https://www.excelbanter.com/excel-programming/349237-q-entering-criteria-within-query.html)

John

Q on Entering a Criteria within a Query
 
Could anyone explain the error below which I receive when I attempt to enter
a Criteria within the "Value" field of [From],[To] relating to a
CriteriaField "StaffNumber"

"Invalid Character Value for Cast specification (null)" - when I select
help, it says this error was returned by the driver

I use the same Value Field when I use to extract between 2 dates. How do I
use in the above situation i.e. when I am looking for a specific StaffNumber
(which I intend to select from the parameter, which will allow me more
flexibility)



Thanks



K Dales[_2_]

Q on Entering a Criteria within a Query
 
I don't think your problem is related to the fact that you are trying to use
a parameter but rather the SQL statement is having trouble, perhaps related
to the value of the parameter. The error message implies a problem with the
CAST function in SQL which seems to be erroring out because it is looking at
a NULL. To diagnose I would need to see the SQL statement and the values of
the parameters you are using when you get the error.
--
- K Dales


"John" wrote:

Could anyone explain the error below which I receive when I attempt to enter
a Criteria within the "Value" field of [From],[To] relating to a
CriteriaField "StaffNumber"

"Invalid Character Value for Cast specification (null)" - when I select
help, it says this error was returned by the driver

I use the same Value Field when I use to extract between 2 dates. How do I
use in the above situation i.e. when I am looking for a specific StaffNumber
(which I intend to select from the parameter, which will allow me more
flexibility)



Thanks





All times are GMT +1. The time now is 11:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com