[AccessD] Ambiguous Nmae in Query Expression

Kaup, Chester Chester_Kaup at kindermorgan.com
Thu Apr 13 11:13:27 CDT 2006


Shortened the query to the following. Changed the field name Date in the
table ProdPattern to RecordDate. Still get the same error. Tried the
function in the module and it worked fine. Thanks for the ideas.

SELECT ProdPattern1.PID, DaysInMonth2([ProdPattern1].[RecordDate]) AS
Expr1
FROM [qry Pattern Days on Injection by Fluid] INNER JOIN ProdPattern1 ON
([qry Pattern Days on Injection by Fluid].Date =
ProdPattern1.RecordDate) AND ([qry Pattern Days on Injection by
Fluid].PID = ProdPattern1.PID);

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte
Sent: Thursday, April 13, 2006 10:32 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Ambiguous Nmae in Query Expression

Chester,

I've seen all of the other ideas...how about just removing one field at
a 
time from your select query until you find the offending field...then
that 
might give some direction.

Thanks,

Mark A. Matte


>From: "Kaup, Chester" <Chester_Kaup at kindermorgan.com>
>Reply-To: Access Developers discussion and problem 
>solving<accessd at databaseadvisors.com>
>To: "Access Developers discussion and problem 
>solving"<accessd at databaseadvisors.com>
>Subject: [AccessD] Ambiguous Nmae in Query Expression
>Date: Thu, 13 Apr 2006 08:41:11 -0500
>
>I have a function in a module as follows:
>
>Function DaysInMonth2(D As Variant) As Variant
>
>
>
>When I try to use the function in a query I get the message Ambiguous
>Name in Query Expression (DaysInMonth2([ProdPattern]![Date]) AS Expr1)
>
>This is the first time I have tried to use a user defined function in a
>query. I need some help on how to do this. Thanks
>
>
>
>The SQL is a follows:
>
>SELECT ProdPattern.PID, ProdPattern.Date, ProdPattern.vm_wtri,
>ProdPattern.vm_co2i, [qry Pattern Days on Injection by
>Fluid].vm_dyswtri, [qry Pattern Days on Injection by Fluid].vm_dysco2i,
>DaysInMonth2([ProdPattern]![Date]) AS Expr1
>
>FROM ProdPattern INNER JOIN [qry Pattern Days on Injection by Fluid] ON
>(ProdPattern.PID = [qry Pattern Days on Injection by Fluid].PID) AND
>(ProdPattern.Date = [qry Pattern Days on Injection by Fluid].Date)
>
>WHERE (((ProdPattern.PID)=[Pattern Name]));
>
>
>
>Chester Kaup
>
>Engineering Technician
>
>Kinder Morgan CO2 Company, LLP
>
>Office (432) 688-3797
>
>FAX (432) 688-3799
>
>
>
>
>
>No trees were killed in the sending of this message. However a large
>number of electrons were terribly inconvenienced.
>
>
>
>--
>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