D
DubboPete
Hi all,
I have five string values - strFrame3, strFrame13, strFrame26,
strTitle and StrTotal
I'm trying to create a strTotal that reflects the preceding four
string values depending on what is clicked in the frames, etc. I
keep getting the string that changes to show only, leaving the other
strings blank, even though there are default values loaded on open.
Here's my code on FormOpen:
Private Sub Form_Open(Cancel As Integer)
Dim strFrame3 As String
Dim strFrame13 As String
Dim strFrame26 As String
Dim strTotal As String
Dim strTitle As String
' default string values
strFrame3 = "Community"
strFrame13 = "All"
strFrame26 = "Ambulatory"
strTitle = "Default report"
strTotal = "Waiting values..."
Me.Text36 = strTotal
End Sub
Text36 displays strTotal, so on open it shows:
Waiting values...
Now, if someone clicks one of the option groups, for instance the
first option group, and chooses D&A option (2), strFrame3 should be
updated to the value shown below, and then strTotal should be
refreshed to show the update.
Here's the code for Frame3:
Private Sub Frame13_Click()
If Me.Frame13 = 1 Then
Me.Text25 = ""
ElseIf Me.Frame13 = 2 Then
Me.Text25 = "D&A"
ElseIf Me.Frame13 = 3 Then
Me.Text25 = "MH"
End If
strTotal = strTitle & ", " & strFrame3 & ", " & strFrame13 & ", "
& strFrame26
Me.Text36 = strTotal
End Sub
I am presuming that nothing else has changed, including strTitle, so
here's what I expected it to show:
Waiting values..., D&A, ,
But, I get this :
, , D&A, ,
can anyone find the fault in my code please?
TIA
DubboPete
I have five string values - strFrame3, strFrame13, strFrame26,
strTitle and StrTotal
I'm trying to create a strTotal that reflects the preceding four
string values depending on what is clicked in the frames, etc. I
keep getting the string that changes to show only, leaving the other
strings blank, even though there are default values loaded on open.
Here's my code on FormOpen:
Private Sub Form_Open(Cancel As Integer)
Dim strFrame3 As String
Dim strFrame13 As String
Dim strFrame26 As String
Dim strTotal As String
Dim strTitle As String
' default string values
strFrame3 = "Community"
strFrame13 = "All"
strFrame26 = "Ambulatory"
strTitle = "Default report"
strTotal = "Waiting values..."
Me.Text36 = strTotal
End Sub
Text36 displays strTotal, so on open it shows:
Waiting values...
Now, if someone clicks one of the option groups, for instance the
first option group, and chooses D&A option (2), strFrame3 should be
updated to the value shown below, and then strTotal should be
refreshed to show the update.
Here's the code for Frame3:
Private Sub Frame13_Click()
If Me.Frame13 = 1 Then
Me.Text25 = ""
ElseIf Me.Frame13 = 2 Then
Me.Text25 = "D&A"
ElseIf Me.Frame13 = 3 Then
Me.Text25 = "MH"
End If
strTotal = strTitle & ", " & strFrame3 & ", " & strFrame13 & ", "
& strFrame26
Me.Text36 = strTotal
End Sub
I am presuming that nothing else has changed, including strTitle, so
here's what I expected it to show:
Waiting values..., D&A, ,
But, I get this :
, , D&A, ,
can anyone find the fault in my code please?
TIA
DubboPete