Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Afunction that Won't function Correctly 1

Status
Not open for further replies.

quest4

Technical User
Aug 27, 2001
735
US
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top