Criteria parameter

P

Phil Boorman

I'll try to expand the question I posed earlier in the hopes that someone
can help me.

I am the volunteer Regitrar of a swim club and collect up to 550 checks/year
from members. The checks are for numerous different fee's and are bundled
together and passed on to the treasurer monthly. As I receive them I enter
these checks into my database through a form that includes a field to
indicate what they were intended for (a combo box) and therefore what bundle
they will be a part of. I run a monthly query to pass along with the bundle
by typing the parameter into the criteria of my query - so a new query every
month. I would like to automate this by pre-specifiying the parameters and
being prompted with a list.

I have added the following line to the criteria cell
"[Tables]![DepositBundle]![DepositBundle]" where the table "DepositBundle
has a column "DepositBundle" that is the list I want to appear when the
query is run. So far I only get the "enter parameter value" pop-up box with
no list and it returns nothing.

I don't know how the formating will work but my DepositBundle table looks
like this;

DepositBundle ID DepositBundle
1 Sep
2 Oct
3 Nov
4 Dec
5 Jan
6 Feb
7 Mar
8 Apr
9 May
10 Jun
11 OctFund
12 MarFund
13 Swimathon




Do I need to create a form based on my DepositBundle table and refer to it
in the criteria cell?

Thanks for any help.
 
J

JohnFol

The syntax you are using is not valid.
"[Tables]![DepositBundle]![DepositBundle]"
If your query needs to reference the table called DepositBundle, it needs to
be somewhere in the SQL, ie in a select query it needs to be mentioned in
the table list after the From statement.

It might be worth posting the SQL statement, to see if there are any other
reasons.
 
S

SteveS

Phil said:
I'll try to expand the question I posed earlier in the hopes that someone
can help me.

I am the volunteer Regitrar of a swim club and collect up to 550 checks/year
from members. The checks are for numerous different fee's and are bundled
together and passed on to the treasurer monthly. As I receive them I enter
these checks into my database through a form that includes a field to
indicate what they were intended for (a combo box) and therefore what bundle
they will be a part of. I run a monthly query to pass along with the bundle
by typing the parameter into the criteria of my query - so a new query every
month. I would like to automate this by pre-specifiying the parameters and
being prompted with a list.

I have added the following line to the criteria cell
"[Tables]![DepositBundle]![DepositBundle]" where the table "DepositBundle
has a column "DepositBundle" that is the list I want to appear when the
query is run. So far I only get the "enter parameter value" pop-up box with
no list and it returns nothing.

I don't know how the formating will work but my DepositBundle table looks
like this;

DepositBundle ID DepositBundle
1 Sep
2 Oct
3 Nov
4 Dec
5 Jan
6 Feb
7 Mar
8 Apr
9 May
10 Jun
11 OctFund
12 MarFund
13 Swimathon




Do I need to create a form based on my DepositBundle table and refer to it
in the criteria cell?

Thanks for any help.

It sounds like the query is for a report.
You are on the right track - create a form, let's call it
"frmRptCriteria", and add an unbound combo box (name it "cboCriteria").

The ROW SOURCE of cboCriteria (the unbound combo box) would look
something like (without the quotes):

"Select [DepositBundle ID], DepositBundle From DepositBundle"

In the properties of the combo box, click on the Format tab and set
Column Count = 2
Column Width = 0; 0.5


The criteria row of the query would be:

"Forms!frmRptCriteria.cboCriteria"

HTH
 
P

Phil Boorman

Thanks for the responses.

After too many hours and too much frustration I discovered that reason my
select query didn't work (even after creating the form) is that I kept
trying to run it from the query as opposed to the form! Now it works
perfectly.

Phil


SteveS said:
Phil said:
I'll try to expand the question I posed earlier in the hopes that someone
can help me.

I am the volunteer Regitrar of a swim club and collect up to 550
checks/year from members. The checks are for numerous different fee's and
are bundled together and passed on to the treasurer monthly. As I receive
them I enter these checks into my database through a form that includes a
field to indicate what they were intended for (a combo box) and therefore
what bundle they will be a part of. I run a monthly query to pass along
with the bundle by typing the parameter into the criteria of my query -
so a new query every month. I would like to automate this by
pre-specifiying the parameters and being prompted with a list.

I have added the following line to the criteria cell
"[Tables]![DepositBundle]![DepositBundle]" where the table "DepositBundle
has a column "DepositBundle" that is the list I want to appear when the
query is run. So far I only get the "enter parameter value" pop-up box
with no list and it returns nothing.

I don't know how the formating will work but my DepositBundle table looks
like this;

DepositBundle ID DepositBundle
1 Sep
2 Oct
3 Nov
4 Dec
5 Jan
6 Feb
7 Mar
8 Apr
9 May
10 Jun
11 OctFund
12 MarFund
13 Swimathon




Do I need to create a form based on my DepositBundle table and refer to
it in the criteria cell?

Thanks for any help.

It sounds like the query is for a report.
You are on the right track - create a form, let's call it
"frmRptCriteria", and add an unbound combo box (name it "cboCriteria").

The ROW SOURCE of cboCriteria (the unbound combo box) would look something
like (without the quotes):

"Select [DepositBundle ID], DepositBundle From DepositBundle"

In the properties of the combo box, click on the Format tab and set Column
Count = 2
Column Width = 0; 0.5


The criteria row of the query would be:

"Forms!frmRptCriteria.cboCriteria"

HTH
 

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

Top