I've got a textbox on a report that I'm using to pull the month and year from two textboxes on a form. The following code works in the data source of the textbox:
- ="Billing Period: "
-
& Month([Forms]![frmCustomer]![txtStartDate])
-
& " "
-
& Year([Forms]![frmCustomer]![txtStartDate])
-
& " - "
-
& Month([Forms]![frmCustomer]![txtEndDate])
-
& " "
-
& Year([Forms]![frmCustomer]![txtEndDate])
However, I would like to make it so that I get the name of the month instead of the number. So I tried the following:
- ="Billing Period: "
-
& MonthName([Forms]![frmCustomer]![txtStartDate])
-
& " "
-
& Year([Forms]![frmCustomer]![txtStartDate])
-
& " - "
-
& MonthName([Forms]![frmCustomer]![txtEndDate])
-
& " "
-
& Year([Forms]![frmCustomer]![txtEndDate])
When I preview the report, however, it returns
#Func!. Is the MonthName() function not available in this situation? I don't get any syntax errors while in design view of the report. I even tried adding the
,False to the MonthName() function in case it wanted me to explicitly declare the default, but that didn't change anything.