Re: Access 2000 ADP - error when applying form filter - error message "The column prefix XXX does not match with a table name or alias name used in the query"

From: Sylvain Lafontaine ("Sylvain)
Date: 11/18/04


Date: Thu, 18 Nov 2004 11:38:00 -0500

First, maybe it is the caracter # in the Cluster# that gives DAP a hiccup.
Other things like « dbo.LOCATION.[Location code] » may also give you trouble
with DAP; even if they are perfectly valid under T-SQL. You may try to use
the profiler to see if there is anything unusual in the queries sent by DAP
to the SQL-Server in this situation.

Check also that in the data ouline window everything is OK. This window has
give me some surprises in the past. Sometime, removing the stored procedure
from the design, closing the design window, reopened it and then
re-inserting the stored procedure has been sufficient to make strange bugs
disappear.

Also, you don't give us what is the form filter that you are using and how
you are trying to apply it. Maybe the following article will be of some in
your case: http://support.microsoft.com/default.aspx?scid=kb;EN-US;275071

Finally, if anything else work, then you still have the option of replacing
your server filter with a parameterised SP.

S. L.

"Scott Crowley" <scott_crowley@uk2.net> wrote in message
news:e5g2p%23XzEHA.3096@TK2MSFTNGP10.phx.gbl...
>I have a form whose source data is a select query on three tables with
>inner
> joins connecting them:
>
> SELECT dbo.LOCATION.[Location code] AS LocationCode,
> dbo.Clusters.ClusterNumber AS ClusterNumber,
> dbo.Clusters.ClusterName AS ClusterName,
> dbo.LOCATION.Cluster AS Cluster#,
> dbo.ClusterStaffing.ITWorker AS PrimaryITWorker,
> dbo.ClusterStaffing.WorkerStatus AS WorkerStatus,
> dbo.ClusterStaffing.[Current] AS CurrentWorker,
> dbo.LOCATION.Sitemapref, dbo.LOCATION.Address,
> dbo.LOCATION.Phone
> FROM dbo.LOCATION INNER JOIN
> dbo.Clusters ON
> dbo.LOCATION.Cluster = dbo.Clusters.ClusterNumber INNER JOIN
> dbo.ClusterStaffing ON
> dbo.Clusters.ClusterNumber = dbo.ClusterStaffing.ClusterNo
> WHERE (dbo.ClusterStaffing.[Current] = 1) AND
> (dbo.ClusterStaffing.WorkerStatus = 'Primary')
> ORDER BY dbo.LOCATION.[Location code]
>
> This is fine and the form loads and presents data as I expect. I can
> search
> the form fine.
>
> However, if I try to apply a form filter to one of the fields I get the
> error message:
>
> "The column prefix dbo.LOCATION does not match with a table name or alias
> name used in the query"
>
> and the filter is not applied.
>
> Filter worked fine when the table source query only referenced one table.
> Now I get this since adding more than one table.
>
> I've searched for this error and seen it in relation to SQL queries than
> don
> 't run but not in this scenario.
>
> Can anyone help?
>
> Many thanks in advance.
>
> Regards
>
> Scott



Relevant Pages

  • Re: Access 2000 ADP - error when applying form filter - error message "The column prefix XXX do
    ... maybe it is the caracter # in the Cluster# that gives DAP a hiccup. ... with DAP; even if they are perfectly valid under T-SQL. ... you don't give us what is the form filter that you are using and how ... > name used in the query" ...
    (microsoft.public.access.forms)
  • Re: Customizing Parameters to data access page
    ... why not take the parameters out of the query and put them in the DAP then ... filter based on the answers? ... >>Paul D ...
    (microsoft.public.access.dataaccess.pages)
  • Re: Display No Records Found
    ... The DAP I made, runs the query when the page is opened, The ... query basically just lists any records with the current day's date. ... filter be part of the VBscript like you did (so I can get the 'no ... How would I achieve the same results with VBscript? ...
    (microsoft.public.access.dataaccess.pages)
  • Re: data access page search code
    ... stop bothering yourself with DAP and switch to something else ... Dim SerVal As String 'Value to search against ... Dim strWhere As String 'The filter to use ...
    (microsoft.public.access.modulesdaovba)
  • Re: IPSec and clusters Easy Read Filters
    ... supports IPsec on WS03 clusters so we are sailing into new waters here. ... Filter Action: Allow ... > After one or both cluster nodes are rebooted the "filter ... > Destination Port Source DNS Source Address ...
    (microsoft.public.win2000.security)