sherlocked
Registered User.
- Local time
- Today, 15:24
- Joined
- Sep 22, 2014
- Messages
- 125
Hello experts,
I have a report I'm designing that is grouped by month. The field from the DB that contains the month is a number field, 1 for January, 2 for February and so on.
I'm grouping my report by this field, called [ExecMonth].
I'd like to display the month name based on the value of this field in my group header. I have an unbound field called [txtMonth] and I'm using the below CASE statement to attempt to display the correct information.
What's happening, for some reason I can't determine, is the report is displaying "February" for every record on my report, even though I have records where the [ExecMonth] field is "1" and should show as "January."
What am I doing wrong? Your advice, as always, is greatly appreciated.
I have a report I'm designing that is grouped by month. The field from the DB that contains the month is a number field, 1 for January, 2 for February and so on.
I'm grouping my report by this field, called [ExecMonth].
I'd like to display the month name based on the value of this field in my group header. I have an unbound field called [txtMonth] and I'm using the below CASE statement to attempt to display the correct information.
What's happening, for some reason I can't determine, is the report is displaying "February" for every record on my report, even though I have records where the [ExecMonth] field is "1" and should show as "January."
What am I doing wrong? Your advice, as always, is greatly appreciated.
Code:
Select Case Me.txtExecMonth
Case "1"
Me.txtMonth = "January"
Case "2"
Me.txtMonth = "February"
Case "3"
Me.txtMonth = "March"
Case "4"
Me.txtMonth = "April"
Case "5"
Me.txtMonth = "May"
Case "6"
Me.txtMonth = "June"
Case "7"
Me.txtMonth = "July"
Case "8"
Me.txtMonth = "August"
Case "9"
Me.txtMonth = "September"
Case "10"
Me.txtMonth = "October"
Case "11"
Me.txtMonth = "November"
Case "12"
Me.txtMonth = "December"
End Select