Option Group Message Box

Z

zufie

I want to comment out the Message Box that opens up upon clicking on
either of the checkboxes in the Option Group.

I have attempted to do this by commenting out the following line of
code:
'MsgBox Me.FrameReferralType

Why does this not work?

Any suggestions?

Thanks in advance!,

John

Here is all of my code hehind the Option Group:

Private Sub FrameReferralType_AfterUpdate()
UpdateReferral
End Sub
------------------------------------------------------------------------------------------
Private Sub UpdateReferral()
'MsgBox Me.FrameReferralType
Select Case Me.FrameReferralType
Case 1 'IBCCP
'Dehighlight the "Other" fields
Me.ChckSatisfiedWithHelpReceivedYes.BorderColor = 16777215
Me.ChckSatisfiedWithHelpReceivedNo.BorderColor = 16777215
Me.ChckInNeedFurtherAssistanceYes.BorderColor = 16777215
Me.ChckInNeedFurtherAssistanceNo.BorderColor = 16777215
'Highlight the IBCCP fields
Me.ChckSatisfiedWithHelpReceivedYes.BorderColor = 16777215
Me.ChckSatisfiedWithHelpReceivedNo.BorderColor = 16777215
Me.ChckInNeedFurtherAssistanceYes.BorderColor = 16777215
Me.ChckInNeedFurtherAssistanceNo.BorderColor = 16777215
Case 2 'Other
'Dehighlight the IBCCP fields
Me.ChckSatisfiedWithHelpReceivedYes.BorderColor = 16777215
Me.ChckSatisfiedWithHelpReceivedNo.BorderColor = 16777215
Me.ChckInNeedFurtherAssistanceYes.BorderColor = 16777215
Me.ChckInNeedFurtherAssistanceNo.BorderColor = 16777215
'Highlight the "Other" fields
Me.ChckSatisfiedWithHelpReceivedYes.BorderColor = &HFF
Me.ChckSatisfiedWithHelpReceivedNo.BorderColor = &HFF
Me.ChckInNeedFurtherAssistanceYes.BorderColor = &HFF
Me.ChckInNeedFurtherAssistanceNo.BorderColor = &HFF
End Select
End Sub
 
Z

zufie

I want to comment out the Message Box that opens up upon clicking on
either of the checkboxes in the Option Group.

I have attempted to do this by commenting out the following line of
code:
 'MsgBox Me.FrameReferralType

Why does this not work?

Any suggestions?

Thanks in advance!,

John

Here is all of my code hehind the Option Group:

Private Sub FrameReferralType_AfterUpdate()
UpdateReferral
End Sub
---------------------------------------------------------------------------­---------------
Private Sub UpdateReferral()
'MsgBox Me.FrameReferralType
    Select Case Me.FrameReferralType
        Case 1 'IBCCP
            'Dehighlight the "Other" fields
            Me.ChckSatisfiedWithHelpReceivedYes.BorderColor = 16777215
            Me.ChckSatisfiedWithHelpReceivedNo.BorderColor = 16777215
            Me.ChckInNeedFurtherAssistanceYes.BorderColor =16777215
            Me.ChckInNeedFurtherAssistanceNo.BorderColor = 16777215
            'Highlight the IBCCP fields
            Me.ChckSatisfiedWithHelpReceivedYes.BorderColor = 16777215
            Me.ChckSatisfiedWithHelpReceivedNo.BorderColor = 16777215
            Me.ChckInNeedFurtherAssistanceYes.BorderColor =16777215
            Me.ChckInNeedFurtherAssistanceNo.BorderColor = 16777215
        Case 2 'Other
            'Dehighlight the IBCCP fields
            Me.ChckSatisfiedWithHelpReceivedYes.BorderColor = 16777215
            Me.ChckSatisfiedWithHelpReceivedNo.BorderColor = 16777215
            Me.ChckInNeedFurtherAssistanceYes.BorderColor =16777215
            Me.ChckInNeedFurtherAssistanceNo.BorderColor = 16777215
            'Highlight the "Other" fields
            Me.ChckSatisfiedWithHelpReceivedYes.BorderColor = &HFF
            Me.ChckSatisfiedWithHelpReceivedNo.BorderColor = &HFF
            Me.ChckInNeedFurtherAssistanceYes.BorderColor =&HFF
            Me.ChckInNeedFurtherAssistanceNo.BorderColor = &HFF
    End Select
End Sub

It's working now!

Don't ask me why?!

Thanks!

J
 
C

Carlos

Hi Zufie,

I'll start by saying I'm not knowledgeable with VBA code, so this is
possibly an ignorant suggestion on my part. Use it for what it's worth.

Suggestion: In other Access Code, then I reference a field or other object
anywhere on the code, it pops a questions if that field/object is not defined
anywhere. Because you are commenting out the actual line of code that brings
up the message box, but you are still living the code that uses that answer
in the "Select Case Me.FrameReferralType", could that be why? Is
me.FrameReferralType defined anywhere else?

Again, my apologies if this is a dumb suggestion.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top