[AccessD] Make table query fails

Kaup, Chester Chester_Kaup at kindermorgan.com
Tue Feb 14 12:49:41 CST 2006


Turns out the database had some corruption that a compact and repair
fixed. Also if I try to change the ! to . and eliminate the brackets in
the query grid Access just puts it back. 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Erbach
Sent: Monday, February 13, 2006 4:58 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Make table query fails

Chester,

Is this a query you've got some exclamation points in various places. 
These should be periods, unless you're referencing fields on another
form.  In that case you need the full Forms reference; e.g.,

((SurfaceMaster.Name) = Right(ConfigMaster.PID,Len(ConfigMaster.PID)-4))

instead of

((SurfaceMaster.Name)=Right([ConfigMaster]![PID],Len([ConfigMaster]![PID
])-4))

Does this help?

Steve Erbach
Neenah, WI


On 2/13/06, Kaup, Chester <Chester_Kaup at kindermorgan.com> wrote:
> When I try to run the following query I get a message of invalid
> argument. When I try to view the results in datasheet view it work
fine.
> What might be going wrong? I tried writing the results to a different
> table with no success. No I did not write this ugly query - I was
given
> it. Thanks for ideas.
>
>
>
> SELECT [Funky Ptrn and Wells to Alloc].CO2PAT, [Funky Ptrn and Wells
to
> Alloc].CO2PAT_SDate, [Funky Ptrn and Wells to Alloc].Well_in_CO2PAT,
> [Funky Ptrn and Wells to Alloc].Well_in_CO2PAT_API, ConfigMaster.PID
AS
> Other_Pattern, Right(ConfigMaster!PID,Len(ConfigMaster!PID)-4) AS
> Other_Pattern_as_Well, Constants!SDate AS Other_Pattern_SDate,
> SurfaceMaster.PID AS Other_Pattern_as_Well_API INTO [Funky Temp Other
> Ptrn to Alloc]
>
> FROM SurfaceMaster, [Funky Ptrn and Wells to Alloc]
>
> INNER JOIN (ConfigMaster INNER JOIN Constants ON ConfigMaster.PID =
> Constants.PID) ON [Funky Ptrn and Wells to Alloc].Well_in_CO2PAT_API =
> ConfigMaster.ChildPID
>
> WHERE (((ConfigMaster.PID) Like "PAT*") AND
> ((Constants.Date)<#1/1/1960#) AND
>
((SurfaceMaster.Name)=Right([ConfigMaster]![PID],Len([ConfigMaster]![PID
> ])-4)))
>
> ORDER BY [Funky Ptrn and Wells to Alloc].CO2PAT, [Funky Ptrn and Wells
> to Alloc].Well_in_CO2PAT,
> Right(ConfigMaster!PID,Len(ConfigMaster!PID)-4);
>
>
>
> Chester Kaup
>
-- 
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