[AccessD] Make table query fails

Steve Erbach erbachs at gmail.com
Mon Feb 13 16:57:41 CST 2006


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
>



More information about the AccessD mailing list