Set weekday

  • Thread starter Thread starter Kim
  • Start date Start date
K

Kim

Help????
I group a reports data by date, the group has a group
header with the date in a text box.
I show the weekday in another textbox "=Weekday
([invdate],2)"
I want to use a select case to place the corresponding
weekday in a third textbox.

Dim iDAY As Variant
iDAY = Text18

Select Case iDAY
Case 1
Me.Text19 = "Monday"
Case 2
Me.Text19 = "Tuesday"
Case 3
Me.Text19 = "Wednesday"
Case 4
Me.Text19 = "Thursday"
Case 5
Me.Text19 = "Friday"
Case 6
Me.Text19 = "Saturday"
Case 7
Me.Text19 = "Sunday"
End Select

Is this possible?
If so what event would I use to format the report.

Appreciated
Kim
 
Kim said:
I group a reports data by date, the group has a group
header with the date in a text box.
I show the weekday in another textbox "=Weekday
([invdate],2)"
I want to use a select case to place the corresponding
weekday in a third textbox.

Dim iDAY As Variant
iDAY = Text18

Select Case iDAY
Case 1
Me.Text19 = "Monday"
Case 2
Me.Text19 = "Tuesday"
Case 3
Me.Text19 = "Wednesday"
Case 4
Me.Text19 = "Thursday"
Case 5
Me.Text19 = "Friday"
Case 6
Me.Text19 = "Saturday"
Case 7
Me.Text19 = "Sunday"
End Select

Is this possible?
If so what event would I use to format the report.


Sure it's possible. You would put the code in the text box
section's Format event (or even the Print event).

Inspite of its feasibility, that's the long way around. You
can just use an expression in text19:
=Format(thedatefield, "dddd", 2)
 
Many thanks, so obvious I could not see it.
Regards
Kim
-----Original Message-----
Kim said:
I group a reports data by date, the group has a group
header with the date in a text box.
I show the weekday in another textbox "=Weekday
([invdate],2)"
I want to use a select case to place the corresponding
weekday in a third textbox.

Dim iDAY As Variant
iDAY = Text18

Select Case iDAY
Case 1
Me.Text19 = "Monday"
Case 2
Me.Text19 = "Tuesday"
Case 3
Me.Text19 = "Wednesday"
Case 4
Me.Text19 = "Thursday"
Case 5
Me.Text19 = "Friday"
Case 6
Me.Text19 = "Saturday"
Case 7
Me.Text19 = "Sunday"
End Select

Is this possible?
If so what event would I use to format the report.


Sure it's possible. You would put the code in the text box
section's Format event (or even the Print event).

Inspite of its feasibility, that's the long way around. You
can just use an expression in text19:
=Format(thedatefield, "dddd", 2)
 
Back
Top