Per monnomiznogoud@yahoo.com.ar:
>Now in some of the forms controls I had queries that used as "where
>clause" parameters form field values; For example:
[quoted text clipped - 5 lines]
>
>If *bar* were a local Access table, the query would do fine.
Is the SQL in the form's .RecordSource or are you applying it from VBA code?
If it's in .RecordSource, you can probably stop here and move on the next
post...
I've had slightly similar problems when VBS uses a query that refers to a form's
control value. Query works find when invokes by double clicking the query
object, but can't find the referenced control when invoked from VBA.
Workaround for me was to define a parameter in the query and explicitly load it
in VBA before opening an RS.

Signature
PeteCresswell
monnomiznogoud@yahoo.com.ar - 10 Jan 2006 09:37 GMT
PeteCresswell
>Is the SQL in the form's .RecordSource or are you applying it from VBA code?
It is in the a list's record source in fact.
The IT services suggested to put back the Access 97 Sybase's patch :)
The only solution i found is the one i posted above, an innner select
using the form's field value with a local table (dual, a one-line
oracle-like table i defined)