form to query

  • Thread starter spcscooter via AccessMonster.com
  • Start date
S

spcscooter via AccessMonster.com

I need to create a form that will allow the user to enter an RMA Number for
the query criteria. I already have made the query but I am not sure how to
avoid making the user create a new query for each time they need to query an
RMA Number. My thoughts are using a form to enter the RMA and have a report
pop up displaying the results.
 
A

Al Campagna

spcscooter,
Several ways to do that...

Let's say that on form frmMyMain, you have a text control called
RMANumber.
In your query, use the open form's RMA value to filter the query.
The criteria gainst the RMA number in your query would be...
=Forms!frmMyMain!RMANumber

That query can now be used as the Record Source for your report.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
S

spcscooter via AccessMonster.com

I did what you suggested and nothing came up in the query. I wan't to be
able to create a seperate form from the main RMAEntry form to run these
queries so I can print the coinciding report.

Al said:
spcscooter,
Several ways to do that...

Let's say that on form frmMyMain, you have a text control called
RMANumber.
In your query, use the open form's RMA value to filter the query.
The criteria gainst the RMA number in your query would be...
=Forms!frmMyMain!RMANumber

That query can now be used as the Record Source for your report.
I need to create a form that will allow the user to enter an RMA Number for
the query criteria. I already have made the query but I am not sure how
[quoted text clipped - 4 lines]
report
pop up displaying the results.
 
S

spcscooter via AccessMonster.com

I think this might be easier. is there a way that when a user tries to open
a query, the user is promted to enter in the criteria of the query. I know
how to do between but I am not sure how this would work.
I did what you suggested and nothing came up in the query. I wan't to be
able to create a seperate form from the main RMAEntry form to run these
queries so I can print the coinciding report.
spcscooter,
Several ways to do that...
[quoted text clipped - 11 lines]
 
A

Al Campagna

spcscooter,
If a code suggestion fails, it's advisable to send the cut & pasted code
that you used... along with description of your form, and the control that
will contain the criteria value.
Please don't <snip> my responses (or yours either). We need to see what
my reply was, so I can check for mistakes I might have made, and for
everyone to see the complete flow of the problem.
a query, the user is promted to enter in the criteria of the query.
You can use an InputBox to pop up, and ask the user for a value to
criteria the report query.
Once you have the InputBox value, you can plug that into your
OpenReport's Where argument.

Or, if you put this criteria in the field of your query you want to use
as a filter...
= [Enter some value]
This is called a "parameter" query.
When the report's query opens, it does not know what [Enter some value]
is, so it will pop up an inputbox and ask the user for a value. That value
you enter in the Inputbox will crteria/filter the query for the report.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

spcscooter via AccessMonster.com said:
I think this might be easier. is there a way that when a user tries to
open
a query, the user is promted to enter in the criteria of the query. I
know
how to do between but I am not sure how this would work.
I did what you suggested and nothing came up in the query. I wan't to be
able to create a seperate form from the main RMAEntry form to run these
queries so I can print the coinciding report.
spcscooter,
Several ways to do that...
[quoted text clipped - 11 lines]
report
pop up displaying the results.

--
Scot Rawlings
Technical Trainer
Comcast
Auburn, WA
 
S

spcscooter via AccessMonster.com

I apologize for stepping on any toes. It was not my intention to do so. I
guess you could say I was thinking out loud.

Al said:
spcscooter,
If a code suggestion fails, it's advisable to send the cut & pasted code
that you used... along with description of your form, and the control that
will contain the criteria value.
Please don't <snip> my responses (or yours either). We need to see what
my reply was, so I can check for mistakes I might have made, and for
everyone to see the complete flow of the problem.
a query, the user is promted to enter in the criteria of the query.
You can use an InputBox to pop up, and ask the user for a value to
criteria the report query.
Once you have the InputBox value, you can plug that into your
OpenReport's Where argument.

Or, if you put this criteria in the field of your query you want to use
as a filter...
= [Enter some value]
This is called a "parameter" query.
When the report's query opens, it does not know what [Enter some value]
is, so it will pop up an inputbox and ask the user for a value. That value
you enter in the Inputbox will crteria/filter the query for the report.
I think this might be easier. is there a way that when a user tries to
open
[quoted text clipped - 11 lines]
 
A

Al Campagna

spcscooter
No problem... Did you try either of my suggestions?

Using an InputBox for a value to crieria the query has the advantage
between my two suggestions.
It doesn't "hard wire" a value into the query criteria...
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

spcscooter via AccessMonster.com said:
I apologize for stepping on any toes. It was not my intention to do so. I
guess you could say I was thinking out loud.

Al said:
spcscooter,
If a code suggestion fails, it's advisable to send the cut & pasted
code
that you used... along with description of your form, and the control that
will contain the criteria value.
Please don't <snip> my responses (or yours either). We need to see
what
my reply was, so I can check for mistakes I might have made, and for
everyone to see the complete flow of the problem.
a query, the user is promted to enter in the criteria of the query.
You can use an InputBox to pop up, and ask the user for a value to
criteria the report query.
Once you have the InputBox value, you can plug that into your
OpenReport's Where argument.

Or, if you put this criteria in the field of your query you want to
use
as a filter...
= [Enter some value]
This is called a "parameter" query.
When the report's query opens, it does not know what [Enter some
value]
is, so it will pop up an inputbox and ask the user for a value. That
value
you enter in the Inputbox will crteria/filter the query for the report.
I think this might be easier. is there a way that when a user tries to
open
[quoted text clipped - 11 lines]
report
pop up displaying the results.

--
Scot Rawlings
Technical Trainer
Comcast
Auburn, WA
 

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