PC Review


Reply
Thread Tools Rate Thread

Data Type Mismatch in Expression - can I force a query to read as a diferent data type?

 
 
S Davis
Guest
Posts: n/a
 
      7th Jun 2007
Hello,

I have an update query with the simple criteria of 'Update Table Month
to 999 if QueryMonth is less than TableMonth'. This is part of a
rolling process to be executed by Macro. The Table containing
TableMonth is created bya maketable query, and TableMonth defaults to
text (even though it is only a number between 1 - 16). QueryMonth, the
month in my comparison query, is a value, and this causes the Data
Type MisMatch and prevents me from updating TableMonth to 999 as the
data types are different.

Is there any way I can force my query to 'create' QueryMonth as a text
value? If not, I saw in my Macro options that there is a toggle for
RunSQL - is there a simple piece of SQl I can use to look at my Table
containing TableMonth and change its properties from Text to Number?

Thanks for any help

 
Reply With Quote
 
 
 
 
=?Utf-8?B?S0FSTCBERVdFWQ==?=
Guest
Posts: n/a
 
      7th Jun 2007
Post your SQL. I bet that if you put double quotes around the "999" it will
work.
--
KARL DEWEY
Build a little - Test a little


"S Davis" wrote:

> Hello,
>
> I have an update query with the simple criteria of 'Update Table Month
> to 999 if QueryMonth is less than TableMonth'. This is part of a
> rolling process to be executed by Macro. The Table containing
> TableMonth is created bya maketable query, and TableMonth defaults to
> text (even though it is only a number between 1 - 16). QueryMonth, the
> month in my comparison query, is a value, and this causes the Data
> Type MisMatch and prevents me from updating TableMonth to 999 as the
> data types are different.
>
> Is there any way I can force my query to 'create' QueryMonth as a text
> value? If not, I saw in my Macro options that there is a toggle for
> RunSQL - is there a simple piece of SQl I can use to look at my Table
> containing TableMonth and change its properties from Text to Number?
>
> Thanks for any help
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
'Data type mismatch in criteria expression' error in Count query Al Microsoft Access Queries 2 29th May 2009 04:32 AM
'Data type mismatch in criteria expression' error in Count query Al Microsoft Access Queries 1 25th May 2009 04:01 PM
UNION query and Data type mismatch in criteria expression rolaaus Microsoft Access Queries 8 24th Jan 2008 06:49 PM
'Data Type Mismatch In Criteria expression' error when make-table query runs bleighfield Microsoft Access Queries 4 1st Sep 2006 06:23 PM
Sum query: Data type mismatch in criteria expression igor.barbaric@infotehna.si Microsoft Access 1 27th Jan 2006 08:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:29 AM.