[AccessD] Query Criteria problem

Arthur Fuller fuller.artful at gmail.com
Tue Aug 21 16:32:02 CDT 2007


JC and I are on about this from time to time. My preferred approach is
static functions, JC's is a class. Either way, free yourself from dependency
on the form. Search the archive for "static functions" or "classes" and
learn how to break free of dependence upon forms.

A.

On 8/21/07, Doug Murphy <dw-murphy at cox.net> wrote:
>
> Folks,
>
> I have a query that uses the value of a text box on a form as the criteria
> for one of its fields.  This has been working fine.  I made some updates
> to
> the form used in the criteria and then updated the query criteria do to a
> change of a control name.  Now I get an error when I try and run the
> query.
> The error message is "The Microsoft Jet database engine does not recognize
> '[Forms]![frmViewExistingOrder]![txtPumpSelect]' as a valid field name or
> expression.".  Any idea on what is going on here.  The query runs without
> the criteria.  The criterial were constructed using the builder so the
> object spelling is correct.  I have rebuilt the criteria string several
> times to make sure there isn't a spelling problem.  Have also tested the
> criteria string in the Immediate window of the VBA IDE and it returns the
> correct value.
>
> I am at a loss.  I do this all the time but for some reason this one isn't
> working.
>
> I have tried compact/repair and decompile, recompile, compact and it still
> errors.  Tried to use EatBloat but couldn't get the new database to import
> the files.  I must be missing something on the import, it says it
> imported.
> Not my day.
>
> Thanks for any assistance.
>
> Doug
>
> --
> 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