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.
Rick B - 17 Feb 2006 14:26 GMT
If you want the report to use the data from the filtered query, then use
that query as the record source for your report.

Signature
Rick B
> Hi ng, I m marco
> I m new in access. I m working with A97 (i dont know vba) and i have this
[quoted text clipped - 8 lines]
> mouse was pointing in that moment before i clicked on the print button.
> Thank you in advance.
Ed Robichaud - 17 Feb 2006 14:28 GMT
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
[quoted text clipped - 8 lines]
> mouse was pointing in that moment before i clicked on the print button.
> Thank you in advance.
mz - 17 Feb 2006 17:27 GMT
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
> 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.
[quoted text clipped - 12 lines]
>> mouse was pointing in that moment before i clicked on the print button.
>> Thank you in advance.
Ed Robichaud - 17 Feb 2006 23:26 GMT
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
> hi all
>
[quoted text clipped - 22 lines]
>>> mouse was pointing in that moment before i clicked on the print button.
>>> Thank you in advance.
mz - 18 Feb 2006 23:28 GMT
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
> 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
[quoted text clipped - 39 lines]
>>>> mouse was pointing in that moment before i clicked on the print button.
>>>> Thank you in advance.
Ed Robichaud - 19 Feb 2006 15:58 GMT
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
> thank you Ed for your help, i saw something similar, as you said, in
> microsoft nortwind database. I will try in that way.
[quoted text clipped - 48 lines]
>>>>> button.
>>>>> Thank you in advance.
KARL DEWEY - 17 Feb 2006 15:40 GMT
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 ng, I m marco
> I m new in access. I m working with A97 (i dont know vba) and i have this
[quoted text clipped - 8 lines]
> pointing in that moment before i clicked on the print button.
> Thank you in advance.