I have a function, GetNumWeeks, in the module section, which is very simply:
Function GetNumWeeks() As Integer
GetNumWeeks=13
End Function
I have a select query where I am trying to use it, in the WHERE clause, I have this line of code:
(Att.DateWeekStarting Between Nz([Enter Start Date], DateAdd("ww",-1-GetNumWeeks(), Date()))
And Dateadd("ww",[Enter the Period], Nz(GetNumWeeks(), DateAdd("ww",-1-GetNumWeeks(), Date()))))
When I try and runthe query I get a message that says: "Undefined function 'GetNumWeeks' in expression." I have tryrf to rename the to modGetNumWeeks but that did not work either. Any one with some knowledge of VD and queries, could you please show me the error of my ways. Thanks in advance, to anyone who helps.
Function GetNumWeeks() As Integer
GetNumWeeks=13
End Function
I have a select query where I am trying to use it, in the WHERE clause, I have this line of code:
(Att.DateWeekStarting Between Nz([Enter Start Date], DateAdd("ww",-1-GetNumWeeks(), Date()))
And Dateadd("ww",[Enter the Period], Nz(GetNumWeeks(), DateAdd("ww",-1-GetNumWeeks(), Date()))))
When I try and runthe query I get a message that says: "Undefined function 'GetNumWeeks' in expression." I have tryrf to rename the to modGetNumWeeks but that did not work either. Any one with some knowledge of VD and queries, could you please show me the error of my ways. Thanks in advance, to anyone who helps.