Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

send form results to report-printer 2

Status
Not open for further replies.

nslrd

Programmer
Dec 16, 1999
4
CA
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 &quot;LetMeSeeIt&quot; in this example below<br>
Here's an example of an Icon's properties on my desktop.<br>
<br>
&quot;C:\Microsoft Office97\Office\MSACCESS.EXE&quot; P:\Stocks\RollingStockPlanner.mdb /X LetMeSeeIt<br>
<br>
Note there is a blank space between the .exe&quot; 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 &quot;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>

 
I'm creating report and query and that will work just fine.<br>
<br>
your help has been much appreciated<br>
<br>
<br>
<br>

 
Here's an alternate method from the Feb 2000 issue of Inside Microsoft Access (<A HREF=" TARGET="_new"> 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 &quot;rptFilter&quot;, acViewPreview,,frm.Filter<br>
Else<br>
DoCmd.OpenReport &quot;rptFilter&quot;, 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 &quot;frmFilter&quot; 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 &lt;----error is here<br>
If iFilterType = acApplyFilter Then<br>
DoCmd.OpenReport &quot;rptFilter&quot;, acViewPreview, , frm.Filter<br>
Else<br>
DoCmd.OpenReport &quot;rptFilter&quot;, acViewPreview<br>
End If<br>
End Sub<br>
<br>
Laurie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top