Querries

G

Guest

I am reposting my current issue because I may have not been very clear.
I currently have a query where I need the criteria of specific fields to be
updated by a combo box linked to other tables. I have the como boxes in the
form and the query has the following code:

SELECT Budget.[Cost Center], Budget.Expense, Budget.[July 2007],
July2007Forecast.[July 2007]
FROM Budget INNER JOIN July2007Forecast ON (Budget.Expense =
July2007Forecast.Expense) AND (Budget.[Cost Center] = July2007Forecast.[Cost
Center])
WHERE (((Budget.[Cost Center])=[forms]![frm_July]![cmb_costcenter]) AND
((Budget.Expense)=[forms]![frm_July]![cmb_expense]));

Every time I click the run query option button, the query parameter request
pops up. Any help would be greatly appreciated!
 
G

Guest

Is the form frm_July open when you run the query?

Make sure that the names are correct, form and text box
 
G

Guest

Yes it is. Basically I want the form to allow for user-specific requests and
then present the result from the query without the user needing to go to the
actual query to run it. I set up a macros to perform this task within the
same form. Do I need to create two seperate forms, one to specify the
criteria and another to run the query?


Ofer Cohen said:
Is the form frm_July open when you run the query?

Make sure that the names are correct, form and text box
--
Good Luck
BS"D


Joseph said:
I am reposting my current issue because I may have not been very clear.
I currently have a query where I need the criteria of specific fields to be
updated by a combo box linked to other tables. I have the como boxes in the
form and the query has the following code:

SELECT Budget.[Cost Center], Budget.Expense, Budget.[July 2007],
July2007Forecast.[July 2007]
FROM Budget INNER JOIN July2007Forecast ON (Budget.Expense =
July2007Forecast.Expense) AND (Budget.[Cost Center] = July2007Forecast.[Cost
Center])
WHERE (((Budget.[Cost Center])=[forms]![frm_July]![cmb_costcenter]) AND
((Budget.Expense)=[forms]![frm_July]![cmb_expense]));

Every time I click the run query option button, the query parameter request
pops up. Any help would be greatly appreciated!
 
G

Guest

You don't need to create two forms, one is enough.

The form will have the text boxes that are used for the criteria and a
button to open the query, I suggest to use code and not a macro.
On the OnClick event of the button enter the code

Docmd.OpenQuery "QueryName"

--
Good Luck
BS"D


Joseph said:
Yes it is. Basically I want the form to allow for user-specific requests and
then present the result from the query without the user needing to go to the
actual query to run it. I set up a macros to perform this task within the
same form. Do I need to create two seperate forms, one to specify the
criteria and another to run the query?


Ofer Cohen said:
Is the form frm_July open when you run the query?

Make sure that the names are correct, form and text box
--
Good Luck
BS"D


Joseph said:
I am reposting my current issue because I may have not been very clear.
I currently have a query where I need the criteria of specific fields to be
updated by a combo box linked to other tables. I have the como boxes in the
form and the query has the following code:

SELECT Budget.[Cost Center], Budget.Expense, Budget.[July 2007],
July2007Forecast.[July 2007]
FROM Budget INNER JOIN July2007Forecast ON (Budget.Expense =
July2007Forecast.Expense) AND (Budget.[Cost Center] = July2007Forecast.[Cost
Center])
WHERE (((Budget.[Cost Center])=[forms]![frm_July]![cmb_costcenter]) AND
((Budget.Expense)=[forms]![frm_July]![cmb_expense]));

Every time I click the run query option button, the query parameter request
pops up. Any help would be greatly appreciated!
 
G

Guest

Thank you very much for your help

Ofer Cohen said:
You don't need to create two forms, one is enough.

The form will have the text boxes that are used for the criteria and a
button to open the query, I suggest to use code and not a macro.
On the OnClick event of the button enter the code

Docmd.OpenQuery "QueryName"

--
Good Luck
BS"D


Joseph said:
Yes it is. Basically I want the form to allow for user-specific requests and
then present the result from the query without the user needing to go to the
actual query to run it. I set up a macros to perform this task within the
same form. Do I need to create two seperate forms, one to specify the
criteria and another to run the query?


Ofer Cohen said:
Is the form frm_July open when you run the query?

Make sure that the names are correct, form and text box
--
Good Luck
BS"D


:

I am reposting my current issue because I may have not been very clear.
I currently have a query where I need the criteria of specific fields to be
updated by a combo box linked to other tables. I have the como boxes in the
form and the query has the following code:

SELECT Budget.[Cost Center], Budget.Expense, Budget.[July 2007],
July2007Forecast.[July 2007]
FROM Budget INNER JOIN July2007Forecast ON (Budget.Expense =
July2007Forecast.Expense) AND (Budget.[Cost Center] = July2007Forecast.[Cost
Center])
WHERE (((Budget.[Cost Center])=[forms]![frm_July]![cmb_costcenter]) AND
((Budget.Expense)=[forms]![frm_July]![cmb_expense]));

Every time I click the run query option button, the query parameter request
pops up. Any help would be greatly appreciated!
 

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