Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
entering parameter criteria MS Query KM01 Excel Discussion (Misc queries) 0 April 29th 10 12:46 PM
Query criteria based on a changing criteria list bwilk77 Excel Discussion (Misc queries) 2 May 27th 09 04:03 PM
Convert hard coded query criteria to Parameter Query Melanie[_2_] Excel Discussion (Misc queries) 0 July 15th 08 09:59 PM
Entering Date via SQL Query ajitrajput Excel Programming 4 July 23rd 04 06:08 PM
Entering Query Parameters by UserForm David Excel Programming 2 April 29th 04 09:21 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"