print current form to a report HELP

  • Thread starter Thread starter mz
  • Start date Start date
M

mz

Hi ng, I m marco
I m new in access. I m working with A97 (i dont know vba) and i have this
problem. I created a TABLE(name,surname,date of born)
I created a QUERY that filter the table (between [years] and [years]). I
created a FORM that show the filtered table by query x years, and a
REPORT(name,surname,dateofborn).
My question is i'd like to put a BUTTON print in the FORM that will print
ALL the filtered data that i view in that moment, but i m not able.
I tried (by putting some vba on event click of the print buttonread surfing)
but what i see is or all the TABLE or just the record that the mouse was
pointing in that moment before i clicked on the print button.
Thank you in advance.
 
If you want the report to use the data from the filtered query, then use
that query as the record source for your report.
 
Make the record source of your report the same query that is the record
source of your form. They will both display the same records.
-Ed
 
My Access 2002, SP3 has function to save form as report.

Open the form in design view and click on menu FILE - Save as...
The window defaults to Form - select Report.
 
hi all

I did it,i think, but when i click the button print (by the wizard from the
form, print report), again appears the question between and,but, i dont want
to fill it again, but i want to use the the data filled in the form i see by
the previous between and query. I hope you understand.

marco




Ed Robichaud said:
Make the record source of your report the same query that is the record
source of your form. They will both display the same records.
-Ed

mz said:
Hi ng, I m marco
I m new in access. I m working with A97 (i dont know vba) and i have this
problem. I created a TABLE(name,surname,date of born)
I created a QUERY that filter the table (between [years] and [years]). I
created a FORM that show the filtered table by query x years, and a
REPORT(name,surname,dateofborn).
My question is i'd like to put a BUTTON print in the FORM that will print
ALL the filtered data that i view in that moment, but i m not able.
I tried (by putting some vba on event click of the print buttonread
surfing) but what i see is or all the TABLE or just the record that the
mouse was pointing in that moment before i clicked on the print button.
Thank you in advance.
 
Sounds like you're using a parameter query to fill your form and report.
That will prompt you for criteria values each time it runs. Try adding some
unbound controls to your form (or a new pop-up form) into which you can
enter the desired criteria. Then use those values as the criteria for your
query. Example:

Your form is named "frmMyFilter" and has two unbound text boxes named
txtDate and txtMoney

Your query design grid would have two columns:
[BillDate] with the criteria of ">forms!frmMyFilter!txtDate
[BillAmt] with the criteria of ">=forms!frmMyFilter!txtMoney

Records printed will now be bills after the input date and greater or equal
to the input amount.
-Ed


mz said:
hi all

I did it,i think, but when i click the button print (by the wizard from
the form, print report), again appears the question between and,but, i
dont want to fill it again, but i want to use the the data filled in the
form i see by the previous between and query. I hope you understand.

marco




Ed Robichaud said:
Make the record source of your report the same query that is the record
source of your form. They will both display the same records.
-Ed

mz said:
Hi ng, I m marco
I m new in access. I m working with A97 (i dont know vba) and i have
this problem. I created a TABLE(name,surname,date of born)
I created a QUERY that filter the table (between [years] and [years]). I
created a FORM that show the filtered table by query x years, and a
REPORT(name,surname,dateofborn).
My question is i'd like to put a BUTTON print in the FORM that will
print ALL the filtered data that i view in that moment, but i m not
able.
I tried (by putting some vba on event click of the print buttonread
surfing) but what i see is or all the TABLE or just the record that the
mouse was pointing in that moment before i clicked on the print button.
Thank you in advance.
 
thank you Ed for your help, i saw something similar, as you said, in
microsoft nortwind database. I will try in that way.
One other question
in one query is it possible to take the value inside BETWEEN -AND, and use
that value as a filter???

marco

Ed Robichaud said:
Sounds like you're using a parameter query to fill your form and report.
That will prompt you for criteria values each time it runs. Try adding
some unbound controls to your form (or a new pop-up form) into which you
can enter the desired criteria. Then use those values as the criteria for
your query. Example:

Your form is named "frmMyFilter" and has two unbound text boxes named
txtDate and txtMoney

Your query design grid would have two columns:
[BillDate] with the criteria of ">forms!frmMyFilter!txtDate
[BillAmt] with the criteria of ">=forms!frmMyFilter!txtMoney

Records printed will now be bills after the input date and greater or
equal to the input amount.
-Ed


mz said:
hi all

I did it,i think, but when i click the button print (by the wizard from
the form, print report), again appears the question between and,but, i
dont want to fill it again, but i want to use the the data filled in the
form i see by the previous between and query. I hope you understand.

marco




Ed Robichaud said:
Make the record source of your report the same query that is the record
source of your form. They will both display the same records.
-Ed

Hi ng, I m marco
I m new in access. I m working with A97 (i dont know vba) and i have
this problem. I created a TABLE(name,surname,date of born)
I created a QUERY that filter the table (between [years] and [years]).
I created a FORM that show the filtered table by query x years, and a
REPORT(name,surname,dateofborn).
My question is i'd like to put a BUTTON print in the FORM that will
print ALL the filtered data that i view in that moment, but i m not
able.
I tried (by putting some vba on event click of the print buttonread
surfing) but what i see is or all the TABLE or just the record that the
mouse was pointing in that moment before i clicked on the print button.
Thank you in advance.
 
Sure; let's assume you have two controls on your user input form to capture
START and STOP dates. Your query criteria would be something like:
Between Forms!myForm!StartDate AND Forms!myForm!EndDate

Good luck
-Ed

mz said:
thank you Ed for your help, i saw something similar, as you said, in
microsoft nortwind database. I will try in that way.
One other question
in one query is it possible to take the value inside BETWEEN -AND, and use
that value as a filter???

marco

Ed Robichaud said:
Sounds like you're using a parameter query to fill your form and report.
That will prompt you for criteria values each time it runs. Try adding
some unbound controls to your form (or a new pop-up form) into which you
can enter the desired criteria. Then use those values as the criteria
for your query. Example:

Your form is named "frmMyFilter" and has two unbound text boxes named
txtDate and txtMoney

Your query design grid would have two columns:
[BillDate] with the criteria of ">forms!frmMyFilter!txtDate
[BillAmt] with the criteria of ">=forms!frmMyFilter!txtMoney

Records printed will now be bills after the input date and greater or
equal to the input amount.
-Ed


mz said:
hi all

I did it,i think, but when i click the button print (by the wizard from
the form, print report), again appears the question between and,but, i
dont want to fill it again, but i want to use the the data filled in the
form i see by the previous between and query. I hope you understand.

marco




"Ed Robichaud" <[email protected]> ha scritto nel messaggio
Make the record source of your report the same query that is the record
source of your form. They will both display the same records.
-Ed

Hi ng, I m marco
I m new in access. I m working with A97 (i dont know vba) and i have
this problem. I created a TABLE(name,surname,date of born)
I created a QUERY that filter the table (between [years] and [years]).
I created a FORM that show the filtered table by query x years, and a
REPORT(name,surname,dateofborn).
My question is i'd like to put a BUTTON print in the FORM that will
print ALL the filtered data that i view in that moment, but i m not
able.
I tried (by putting some vba on event click of the print buttonread
surfing) but what i see is or all the TABLE or just the record that
the mouse was pointing in that moment before i clicked on the print
button.
Thank you in advance.
 

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