Queries with ODBC tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

I have a query built over a linked table. The criteria for the query is in
a text box on a form. When I run the query it will not find it if using the
text box on the form. If I add the criteria into the query then it works.
This only seems to be a problem when I'm working with linked tables. I'm
running 97. Is this a issue, or am I doing it wrong?

Here is what my query looks like.

SELECT qrBBInventoryMap.[User Field2] AS SKU
FROM qrBBInventoryMap
WHERE (((qrBBInventoryMap.[User
Field2])=[forms]![fmSkuLookUp]![txSkuLookUp]));
 
Hello all,

I have a query built over a linked table. The criteria for the query is in
a text box on a form. When I run the query it will not find it if using the
text box on the form. If I add the criteria into the query then it works.
This only seems to be a problem when I'm working with linked tables. I'm
running 97. Is this a issue, or am I doing it wrong?

Here is what my query looks like.

SELECT qrBBInventoryMap.[User Field2] AS SKU
FROM qrBBInventoryMap
WHERE (((qrBBInventoryMap.[User
Field2])=[forms]![fmSkuLookUp]![txSkuLookUp]));

The form fmSkuLookUp must be open at the time the query is run, and it
must be a mainform (the syntax to reference a control on a subform is
different). Does it prompt for the parameter? How are you opening the
query? What DO you get?

It makes no difference whether the table is linked or local, for what
that's worth.

John W. Vinson[MVP]
 
Back
Top