Question : Printing Tab Forms

I have a little script for printing all parts of a tab form.  Problem is it also prints all records.  How do i get it to print only the current record but all tabs.
Private Sub PrintDocument_Click()
   Dim x
   For x = 0 To Me.TabCtl0.Pages.Count - 1
       Me.TabCtl0.Pages(x).SetFocus
       DoCmd.PrintOut acPrintAll
   Next x
End Sub

Answer : Printing Tab Forms

That's the trouble with printing Forms. You can filter your forms/subforms to show only ONE record each (or whatever subset of records would be correct), but otherwise you'll end up with every record in that form's recordset. You are far, far better off building a Report which will do this (you can use Subreports for your Tabs, or perhaps PageBreaks or Groupings). Reports were designed to be printed, and thus have an Event Model and Format model which is geared to that process.
Random Solutions  
 
programming4us programming4us