Criteria Options

  • Thread starter Thread starter CEV
  • Start date Start date
C

CEV

Hi. I am at the point where I need to start creating Queries and Reports. I
am hoping someone can provide some links to information about entering
criteria. I'm looking for examples and different options and the proper way
to enter them.

Thank You,

CEV
 
Since your question is of a general nature, I can only respond with a general
answer. Hopefully it will point you in the right direction.

When you create a query using the query builder, one of the rows available
is called Criteria. This is where you tell the query build how to filter
data in the field. There are some things it can understand and other it
cannot. For example, a query cannot understand a VBA variable. It can,
however, understand most built in Access functions, user defined functions,
and references to controls on forms. It also understand anything you put in
the criteria row explicitly.

Let's say you want to create a report that uses a query as it's recordsource
and that you only want to include products that have sold less than or equal
to a specific number of units. You will allow the user to enter the number
of units to seach for on your form. Your form name is frmLowUnitSales. The
text box the use will enter the number in is named txtLowNumber. So to tell
the query what you want to filter on for this situation, you would put the
following in the criteria of the field for units sold:

<= [Forms]![frmLowUnitSales]![txtLowNumber]

Now you query knows where to find the number to compare against in your query.

Hope this helps. If you have a specific question, post back.
 
Back
Top