Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jul 2002
    Location
    Clemmons, North Carolina, USA
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Report questions (Access 2000)

    1. I searched but could not find the answer to this. If I have a date type and some of the dates are zero, I want this to display as blank on the report otherwise show the date as 00/00/0000. I know there has to be a way to do this but I have not found it.
    2. I have several fields on a detail line. I want them to print unless one other text field is not empty. If that field is not blank I want it to display or be visible, otherwise the other fields should print. Is there a way to do this in Access?

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

    Re: Report questions (Access 2000)

    1) Do you really mean zero (0), or do you mean null? A zero date would be displayed as 12/30/1899.

    2) Do you want the entire detail section to be skipped, or do you just want to hide specific controls?

  3. #3
    New Lounger
    Join Date
    Jul 2002
    Location
    Clemmons, North Carolina, USA
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report questions (Access 2000)

    1. Yes, really a zero date. I did see the date display as 12/30/1899, but I do not want anything to print if it is zero.

    2. I just want a few specific fields (controls) to not print if the text field is not blank. I sort of need to overlay it. One big message will print if a certain condition is met, otherwise the other controls will print.

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

    Re: Report questions (Access 2000)

    1. Set the Format property of the text box bound to the date field to something like
    <code>
    mm/dd/yyyy;;""
    </code>
    replacing mm/dd/yyyy with the desired date format.

    2. Create code in the On Format event of the detail section of the report:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If IsNull(Me,txtSomething) Then
    Me.ControlA.Visible = True
    Me.ControlB.Visible = True
    Me.ControlC.Visible = True
    Else
    Me.ControlA.Visible = False
    Me.ControlB.Visible = False
    Me.ControlC.Visible = False
    End If
    End Sub

    Adapt as needed.

Posting Permissions

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