Expression question in inherited database

  • Thread starter Thread starter Judi
  • Start date Start date
J

Judi

I have an inherited database and have come across this type of criteria a
couple of times:
=[Forms]![frmBigDollars].[edtDollars]
or
Between [Forms]![frmBigDollars].[edtStart] And
[Forms]![frmBigDollars].[edtEnd]

What does this do? All I see when I run the query are the words
"Forms!frmBigDollars.edtDollars" in a box that desires information. I can't
figure out exactly what the criteria is looking for and I really would like
to know what the ! is for in this expression (sorry if that is not the
correct term).

Thanks to all who can help me.
 
The form "frmBigDollars" needs to be open and have appropriate values in the
edtStart and edtEnd fields. Note that it's the name of the field and not
necessarily what the label says.

Often people create an unbound form with a couple of text fields where
people put in stuff like dates or dollar values. Then there's a button which
runs a query, form, or report. Your query is looking to the form and fields
for criteria values.

Try opening up the frmBigDollars and see what it does.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

Judi said:
I have an inherited database and have come across this type of criteria a
couple of times:
=[Forms]![frmBigDollars].[edtDollars]
or
Between [Forms]![frmBigDollars].[edtStart] And
[Forms]![frmBigDollars].[edtEnd]

What does this do? All I see when I run the query are the words
"Forms!frmBigDollars.edtDollars" in a box that desires information. I can't
figure out exactly what the criteria is looking for and I really would like
to know what the ! is for in this expression (sorry if that is not the
correct term).

Thanks to all who can help me.
 
I have an inherited database and have come across this type of criteria a
couple of times:
=[Forms]![frmBigDollars].[edtDollars]
or
Between [Forms]![frmBigDollars].[edtStart] And
[Forms]![frmBigDollars].[edtEnd]

What does this do? All I see when I run the query are the words
"Forms!frmBigDollars.edtDollars" in a box that desires information. I can't
figure out exactly what the criteria is looking for and I really would like
to know what the ! is for in this expression (sorry if that is not the
correct term).

Thanks to all who can help me.

The database has a form named "frmBigDollars".
It has a control named "edtDollars" and one named "edtStart" and one
named "edtEnd" (possibly others as well, but these 3 we know).

The form must be open when used by the query.
When, for example, this form is opened and the edtStart and edtEnd
Controls are filled in with dates, the query will read those 2 fields
on the form as criteria and return just those records that are within
that date range. The user will not be prompted to enter the variable
date range.

If the edtDollars field is filled in, then the query which refers to
it will return just those records that equal that value in the form,
and the user will not be prompted to enter the criteria value.

After the query is run, then the form may be closed.

Regarding the "!", as in forms!frmBigDollars!edtStart syntax...
The ! tells access that in the Forms collection there is a form named
"frmBigDollars" and that this form contains a control named
"edtStart".
 

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