Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2010
    Posts
    186

    Unanswered: .visible property in Access 07 report

    Hi - I am looking for some help on visible bound text boxes in an access report. I have experience using visible for buttons, text boxes and labels in forms but never a report.

    So in the forms, my approach would be - is the object on or off when I begin in the form? I've done visible = false on_enter of my first field. Then I would prompt for visible = true on some event of the field that relates to whatever I'm hiding.

    My question is, how do you trigger the false and true in a report that open for viewing and printing? The criteria I need for false is if 2 of my text box values equal each other(it's a currency), then I don't need to see one of them, and one other.

    Here's what I've come up with, I don't receive an error. And it's not returning the ones that should be true

    Private Sub Report_Load()
    If ([SLMBAL] = [INVAMT]) Then
    SLMBAL.Visible = False
    PAYMENT.Visible = False
    Else
    SLMBAL.Visible = True
    PAYMENT.Visible = True
    End If
    End Sub

    Can anyone suggest how to write this? Thanks to everyone!!

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    right sort of code, probably the wrong place for it
    I'd suggest you put it in your forms on detail format event, assumnign these controls are in the detail, otherwise put them in te relevant sections on format event
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jun 2010
    Posts
    186

    Thanks!

    Thank you - worked like a charm!

  4. #4
    Join Date
    Jun 2010
    Posts
    186
    hmm - just scared myself -
    In report view they are visible on every detail(not triggered), but on print preview they are not(triggered)...is this typical for report .visibles code the way I typed it????
    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If ([SLMBAL] = [INVAMT]) Then
    SLMBAL.Visible = False
    PAYMENT.Visible = False
    Else
    SLMBAL.Visible = True
    PAYMENT.Visible = True
    End If
    End Sub

Posting Permissions

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