Start New Discussion within our Software Development Community


I have a c# console app that calls some access 2007 queries. One of these queries throws an error "Undefined function 'MonthName' in expression".

I understand that some functions that are available in VBA cant be called from c# and if i comment out the 'monthname' function the call works fine. However it would be better if i could find a way to work round the issue instead of deleting the function.

Can anyone shed any light?

Many thanks.

What's the query and can't you just get the month name in C# if you need to?

Hi Momerath,

yes I think that may be the way to go. I was just wondering if there was something in c# that i was missing!

The query is below

GFMonthName: IIf([Frequency]=1 And [Type]="Regular",MonthName(DatePart("m",[DD Start Date])),Null)
This article has been dead for over six months. Start a new discussion instead.