G
Guest
I am using the VBA code below on my frmSwitchboard to set the caption on a
cmdButton. It works perfect, except, I cannot format the date to display only
the Month and Year. I've tried "format(txtMaxMonth, mmmm yyyy" with and
without brackets, quotations etc. I've tried it in different places in the
code. (txtMaxMonth is a calculated control on the frmSwitchboard and is
formatted to show the Month and Year)
Private Sub Form_Open(Cancel As Integer)
Dim stNextDate As String
stNextDate = DateAdd("m", 1, txtMaxMonth)
Me.CmdNextMonthReports.Caption = "Click to Begin Working on Reports for " &
stNextDate
End Sub
Thanks in advance Doug
cmdButton. It works perfect, except, I cannot format the date to display only
the Month and Year. I've tried "format(txtMaxMonth, mmmm yyyy" with and
without brackets, quotations etc. I've tried it in different places in the
code. (txtMaxMonth is a calculated control on the frmSwitchboard and is
formatted to show the Month and Year)
Private Sub Form_Open(Cancel As Integer)
Dim stNextDate As String
stNextDate = DateAdd("m", 1, txtMaxMonth)
Me.CmdNextMonthReports.Caption = "Click to Begin Working on Reports for " &
stNextDate
End Sub
Thanks in advance Doug