[AccessD] Data Type Mismatch

Charlotte Foust cfoust at infostatsystems.com
Tue Jan 16 10:28:37 CST 2007


No, you're converting it when you apply the Left function.  You would
need to wrap it in a conversion function, like CLng() to turn it back
into a number.

Charlotte Foust 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Keith
Williamson
Sent: Tuesday, January 16, 2007 8:03 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Data Type Mismatch

My [Period] field is the source for both "Month" and "Year".  The period
is formatted as a number, in the source table; consisting of YearMonth
(ie. 200610 - for October 2006.)  IF I use "left([period],4)" to
generate year, and "right([period],2)" to generate month........does
this change the data type?  Using left function on a long integer,
should still keep the result in long integer format, wouldn't it?

Keith E. Williamson | Assist. Controller| kwilliamson at rtkl.com

RTKL Associates Inc. | 901 South Bond Street | Baltimore, Maryland
21231-3305

410-537-6098 direct | 410-276-2136 fax | www.rtkl.com


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Keith
Williamson
Sent: Tuesday, January 16, 2007 10:44 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Data Type Mismatch

Ack!  It is a Union Query that is the source for the report.  I can't
change that, as I can't bring that up in Design view...only SQL view.

Keith E. Williamson | Assist. Controller| kwilliamson at rtkl.com

RTKL Associates Inc. | 901 South Bond Street | Baltimore, Maryland
21231-3305

410-537-6098 direct | 410-276-2136 fax | www.rtkl.com


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gary Kjos
Sent: Tuesday, January 16, 2007 10:14 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Data Type Mismatch

Temporarily create a "Make Table Query" with the other query as input.
Create a temporary table and then run the query, open the result table
in design mode and you will see the data types.

GK

On 1/16/07, Keith Williamson <Kwilliamson at rtkl.com> wrote:
> Is there an easy way to determine exactly what data type is being 
> returned by a query?  I have a report I am trying to run, with a 
> "Docmd.openreport".....but I keep getting a data mismatch error.  For 
> the life of me, I can't figure out why......and I've tried playing
with
> the Where statement, to get it to give me the right data...to no
avail.
> I figure, if I can definitively determine the data type, for my three 
> criterias....I can format the Where statement properly.....and also
> figure out why the query is changing the data type.   Grrrrr!!
>
>
>
> Thanks,
>
>
>
> Keith E. Williamson | Assist. Controller| kwilliamson at rtkl.com
>
> RTKL Associates Inc. | 901 South Bond Street | Baltimore, Maryland
> 21231-3305
>
> 410-537-6098 direct | 410-276-2136 fax | www.rtkl.com 
> <http://www.rtkl.com/>
>
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


--
Gary Kjos
garykjos at gmail.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list