Can't blame you... I like his code better too!
-- Gina Whipp
"I feel I have been denied critical, need to know, information!" - Tremors II "Homer" <Homer[ at ]discussions.microsoft.com> wrote in message news:F9595958-60F7-42A4-BBA6-768FFB192445[ at ]microsoft.com...
[Quoted Text] > > -- > What The Bold Print Giveth; The Fine Print Taketh Away. > > > "fredg" wrote: > >> On Tue, 30 Dec 2008 08:10:18 -0800, Homer wrote: >> >> > -- I have a data base that creates reports from the information input >> > by the >> > user. These reports are in the form of a book. I have a form that >> > allows the >> > user to input information for a header. I need to create a button that >> > prints >> > the header information as a label for the book. I am using Avery 5164 >> > labels >> > (two columns, three labels per column) and found the label wizard in >> > 'new >> > report' but because normally I only use one label per printing I need a >> > way >> > to tell Access which position on the Avery label to print the >> > information to >> > so we can use the whole sheet. >> > >> > What The Bold Print Giveth; The Fine Print Taketh Away. >> >> First create a label report. >> Then add a Report Header. >> Add 2 unbound controls to the Header. >> Name one "SkipControl" >> Leave it's control source blank. >> >> Name the other control "SkipCounter" >> Set it's control source to: >> =[Skip how many?] >> >> Then code the report's Detail Print event. >> >> Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) >> If PrintCount <= [SkipCounter] And [SkipControl] = "Skip" Then >> Me.NextRecord = False ' Skip missing labels on sheet >> Me.PrintSection = False >> Else >> [SkipControl] = "No" ' Print labels >> Me.PrintSection = True >> Me.NextRecord = True >> End If >> >> End Sub >> >> And code the Report Header's Format event. >> >> Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As >> Integer) >> [SkipControl] = "Skip" >> Cancel = True >> End Sub >> >> Run the label report. Enter the number of label positions you wish to >> skip. >> -- >> Fred >> Please respond only to this newsgroup. >> I do not reply to personal e-mail >> > > I thank both of you for the help. I used fredq's technique because I > understood the code better and liked the prompt for how many to skip. It > works great, Thanks again.
|