Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Aug 2002
    Location
    Kankakee, Illinois, USA
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Preventing lines from printing in a report (Access 2000 SP3)

    I have a report that lists hours worked by employee per pay period. The report is set up by week1, week 2, and week 3. I usually enter timecard data twice a month, so there is room for 6 weeks worth of time worked. However, there is usually only 5 weeks worked during the pay period. How do I make the 6th week not print on my report? If there is no date listed in column A, can I tell the rest of the data not to print? Columns B-F just print as "0.00".

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Preventing lines from printing in a report (Access 2000 SP3)

    Are these detail records? If so, put code in the On Format event handler of the Detail section:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If IsNull(Me.[DateField]) Then
    Cancel = True
    Exit Sub
    End If
    ' Other code to execute in Detail_Format goes here
    End Sub

    Replace DateField by the name of the date field you want to test for being empty.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •