I have a datasheet form and when I select rows in the left margin I can select file then print selected records. I would like to know how do I send the same selected records to my report for printing ?
You can't just print some records and some fields that's why they make queries.<br>
You can Print just the highlighted records and all of it's fields.<br>
by clicking on the little gray squares on the far left of the record you know the ones because there is a little black Arrow pointing the right.<br>
Click and Drag down the gray column to select them. <br>
It will highlight the whole line or record.<br>
Make sure you click the Print Selected Records Radio button.<br>
<br>
<br>
thanks DougP<br>
I create name tags for various departments with photos and it would have been I thought one less step if I could select the records as you described and then send them to the label form I created. Rather than creating a query to print the labels by the date they were entered.<br>
It is very helpful in printing a quick list to check the information before I printout the color labels.<br>
<br>
thanks<br>
nslrd
Did you know you can create a report to print mailing labels?<br>
Make the report's record source the query. When you open the report it will ask the same question as the query does.<br>
Do this by putting [Enter Date] in the criteria area of the field such as date in your query. Note the brackets, anything inside them will be the question asked.<br>
Example of between two dates <br>
Between [Enter Start date] and [Enter End Date]<br>
<br>
Once the query is the way you like it, create a report then create a macro that opens that report. Next create an Icon on your desktop that loads Access and runs the macro. /X means run a macro the macro name is "LetMeSeeIt" in this example below<br>
Here's an example of an Icon's properties on my desktop.<br>
<br>
"C:\Microsoft Office97\Office\MSACCESS.EXE" P:\Stocks\RollingStockPlanner.mdb /X LetMeSeeIt<br>
<br>
Note there is a blank space between the .exe" and the database name and a space before and after the /X .<br>
Also the macro name CANNOT have any spaces in it.<br>
Also note the "C:\Microsoft Office97<br>
has quotes around it thats because there is a space in the path see Microsoft space Office97.<br>
<br>
Access is very powerful you can also automate the query-report to show say only new employee's based on a criteria.<br>
<br>
I once made a report that printed automatically when a persons computer was turned on. I added an Icon in the startup folder which launched Access and ran a macro.<br>
The macro opened a report which looked at the system date. Then closed Access after it printed.<br>
If you take a little time to create a query and report the savings in time later will be very great.<br>
<br>
DougP<br>
Assumes your report is rptFilter & your form is frmFilter:<br>
<br>
1. Create a button cmdPrint on your form.<br>
2. In the General Declarations of the form, enter: Dim iFilterType as Integer<br>
3. In the OnClick event of the button enter:<br>
Dim frm as Form<br>
Set frm= Forms!frmFilter<br>
If iFilterType = acApplyFilter then<br>
Domd.OpenReport "rptFilter", acViewPreview,,frm.Filter<br>
Else<br>
DoCmd.OpenReport "rptFilter", acViewPreview<br>
End if<br>
<br>
I have pasted the code from the button I created and I get an error message can't find form "frmFilter" referred to in a macro expression.<br>
can you help me<br>
<br>
Private Sub cmdPrint_DblClick(Cancel As Integer)<br>
Dim frm As Form<br>
Set frm = Forms!frmFilter <----error is here<br>
If iFilterType = acApplyFilter Then<br>
DoCmd.OpenReport "rptFilter", acViewPreview, , frm.Filter<br>
Else<br>
DoCmd.OpenReport "rptFilter", acViewPreview<br>
End If<br>
End Sub<br>
<br>
Laurie
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.