Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Check Box Question (A2K SR1)

    The query that populates my report returns a checked or unchecked Check Box (VendorExecute), depending on the user's selection. I've placed the Check Box on my report, but made it invisible. Depending on the status of the Check Box, I want 1 of 2 labels to display. The following code won't work, however:

    Private Sub Report_Open(Cancel As Integer)
    If Me!VendorExecute = True Then
    Me!Label152.Visible = True
    Me!Label154.Visible = False
    Else
    Me!Label152.Visible = False
    Me!Label154.Visible = True
    End If

    Why? Thanks for the help.

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Check Box Question (A2K SR1)

    Since Label152 and Label154 are not Data fields, try using:

    Me.Label152.Visible = True
    Me.Label154.Visible = False

    ("." instead of "!" - although, theoretically, either way should work...)

    If that doesn't fix it, try placing this code in the OnFormat event of the appropriate section (Detail, Header, Footer, etc...).

    HTH <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15>

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Check Box Question (A2K SR1)

    Put your code in the detail section's Format event.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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