Query Criteria / Dialog Box

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

Guest

I have a dialog box to run a query. I'm having trouble with an expression in
the query. This is the expression:

Flute: [1FluteType] & "" & [2FluteType] & "" & [3FluteType]

I've tried this criteria but it doesn't work:
([Flute])=[Forms]![frmQueryPKCGPhysicalMaterialAttributes]![cbFlute] Or
[Forms]![frmQueryPKCGPhysicalMaterialAttributes]![cbFlute] Is Null

How can I create a criteria for this expression? Is this possible?

Thanks!
 
Do you have three fields named 1FluteType, 2FluteType, and 3FluteType?
And you want to find any record that has
[Forms]![frmQueryPKCGPhysicalMaterialAttributes]![cbFlute] matching?

Try this in your SQL --
WHERE
[1FluteType]=[Forms]![frmQueryPKCGPhysicalMaterialAttributes]![cbFlute] Or
[2FluteType]=[Forms]![frmQueryPKCGPhysicalMaterialAttributes]![cbFlute] Or
[3FluteType]=[Forms]![frmQueryPKCGPhysicalMaterialAttributes]![cbFlute]

If you are not into SQL then in the query design grid pull down the three
fields and add the criteria
[Forms]![frmQueryPKCGPhysicalMaterialAttributes]![cbFlute] but on a different
criteria row of the grid.
 
Thanks, Karl.
Do you have three fields named 1FluteType, 2FluteType, and 3FluteType?

Yes. I concatenated them with the expression because ultimately the 3 flute
types will relate to one record. BTW this is in regards to a corrugated box
where a triple walled box contains 3 flute types.

I've given your suggestion a try but it's not working.

I suppose I could simply place all three fields into the query individually
but then that complicates the dialog box as it doesn't make sense to filter
them out individually.

It appears that an expression field in a query can't be setup with a
criteria the same as a "regular" field...?

--
www.Marzetti.com


KARL DEWEY said:
Do you have three fields named 1FluteType, 2FluteType, and 3FluteType?
And you want to find any record that has
[Forms]![frmQueryPKCGPhysicalMaterialAttributes]![cbFlute] matching?

Try this in your SQL --
WHERE
[1FluteType]=[Forms]![frmQueryPKCGPhysicalMaterialAttributes]![cbFlute] Or
[2FluteType]=[Forms]![frmQueryPKCGPhysicalMaterialAttributes]![cbFlute] Or
[3FluteType]=[Forms]![frmQueryPKCGPhysicalMaterialAttributes]![cbFlute]

If you are not into SQL then in the query design grid pull down the three
fields and add the criteria
[Forms]![frmQueryPKCGPhysicalMaterialAttributes]![cbFlute] but on a different
criteria row of the grid.
JohnLute said:
I have a dialog box to run a query. I'm having trouble with an expression in
the query. This is the expression:

Flute: [1FluteType] & "" & [2FluteType] & "" & [3FluteType]

I've tried this criteria but it doesn't work:
([Flute])=[Forms]![frmQueryPKCGPhysicalMaterialAttributes]![cbFlute] Or
[Forms]![frmQueryPKCGPhysicalMaterialAttributes]![cbFlute] Is Null

How can I create a criteria for this expression? Is this possible?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top