Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2011
    Posts
    1

    Unanswered: Hiding option buttons based on other option buttons

    Hello,

    I'm making a report in Access 2003. I have one sent of option buttons named workingorder and another set named compcondition. When option 1 and 3 are selected in workingorder, I would like compcondition to be hidden. When option 2 is selected, I need to see compcondition.

    I have limited experience with code so hopfully it's just an easy fix that I'm missing. My code in the On Open event for the report is:

    Code:
    Private Sub Report_Open(Cancel As Integer)
    If Me.fmeLMASWorkingOrder = 2 Then Me.fmeLMASCompCondition.Visible = True Else Me.fmeLMASCompCondition = False
    End Sub
    It tells me I have an expression that has no value and highlights "If Me.fmeLMASWorkingOrder = 2 Then"

    I've tried a couple different ways can can't get this to work. Please help!

  2. #2
    Join Date
    Jun 2011
    Posts
    9
    If Me.fmeLMASWorkingOrder = 2 Then
    Me.fmeLMASCompCondition.Visible = True
    Else
    Me.fmeLMASCompCondition = False

    End if << Don't see a End if : ) hope it was that easy.

    Or you might need to change Me.fmeLMASWorkingOrder to Me.fmeLMASWorkingOrder.Value
    Last edited by OpK; 06-15-11 at 18:02.

  3. #3
    Join Date
    Jul 2011
    Location
    Bandar Abbas - Iran
    Posts
    9
    explicit your methods of each object

    Me.Text = "" // it is just for its default property(text)

    use something like that :

    Me.Text.Text = ""

    Me.Option1.Value = 2

    Me.Option1.Enable = False

Posting Permissions

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