Hello... any advice is appreciated. I have the following select cases. What I want to do is when 'Case A' is chosen at the prompt ( where all codes are reported), I woud like to show:
Const cTitle2 As String = "Data Elements" : in red font so that there is a visble distinguish between the different codes...
Hope this makes sense.
Thanks in advance for your help
_______________
Private Sub Report_Open(Cancel As Integer)
Const cTitle1 As String = "- All Source Codes -"
Const cTitle2 As String = "Data Elements"
Const cTitle3 As String = "Data Sources"
Dim strPrompt As String
Dim varResponse As Variant
Let strPrompt = "Enter one of the letters corresponding to the following reports:" & _
vbNewLine & vbNewLine & "A: All Source Codes" & vbNewLine & "B: Data Elements" & _
vbNewLine & "C: Data Sources"
Let varResponse = InputBox(strPrompt, "Title", "A")
With Me
Select Case varResponse
Case "A"
Let .lblTitleLine3.Caption = cTitle1
Let .FilterOn = False
Case "B"
Let .lblTitleLine3.Caption = cTitle2
Let .FilterOn = 1
Let .Filter = "[unionSource]![strRpt] =1"
Case "C"
Let .lblTitleLine3.Caption = cTitle3
Let .FilterOn = 2
Let .Filter = "[unionSource]![strRpt] = 2 "
Case Else
MsgBox "Invalid choice", vbOKOnly
Cancel = 1
End Select
End With
End Sub
Const cTitle2 As String = "Data Elements" : in red font so that there is a visble distinguish between the different codes...
Hope this makes sense.
Thanks in advance for your help
_______________
Private Sub Report_Open(Cancel As Integer)
Const cTitle1 As String = "- All Source Codes -"
Const cTitle2 As String = "Data Elements"
Const cTitle3 As String = "Data Sources"
Dim strPrompt As String
Dim varResponse As Variant
Let strPrompt = "Enter one of the letters corresponding to the following reports:" & _
vbNewLine & vbNewLine & "A: All Source Codes" & vbNewLine & "B: Data Elements" & _
vbNewLine & "C: Data Sources"
Let varResponse = InputBox(strPrompt, "Title", "A")
With Me
Select Case varResponse
Case "A"
Let .lblTitleLine3.Caption = cTitle1
Let .FilterOn = False
Case "B"
Let .lblTitleLine3.Caption = cTitle2
Let .FilterOn = 1
Let .Filter = "[unionSource]![strRpt] =1"
Case "C"
Let .lblTitleLine3.Caption = cTitle3
Let .FilterOn = 2
Let .Filter = "[unionSource]![strRpt] = 2 "
Case Else
MsgBox "Invalid choice", vbOKOnly
Cancel = 1
End Select
End With
End Sub