J Jman883 Registered User. Local time Yesterday, 19:18 Joined Jan 3, 2007 Messages 81 Mar 14, 2009 #21 I found another one that will work, do you see any problems associated with this? Field: Month: DatePart("m",[SAFETY]![RevisionDate]) Criteria:Month(Date())-1
I found another one that will work, do you see any problems associated with this? Field: Month: DatePart("m",[SAFETY]![RevisionDate]) Criteria:Month(Date())-1
HiTechCoach Well-known member Local time Yesterday, 19:18 Joined Mar 6, 2006 Messages 4,357 Mar 14, 2009 #22 Mike375 said: To do that you first create a field based on your date field as in Month([YourDateField]) which will give results from 1 to 12 and then apply your your Month(Date())-1 to the criteria of that field. Click to expand... How does this handle: I am building a query the display records for the past month. Click to expand... The past month will be for only a single year. You code has the potential of returning multiple years, no just the past month..
Mike375 said: To do that you first create a field based on your date field as in Month([YourDateField]) which will give results from 1 to 12 and then apply your your Month(Date())-1 to the criteria of that field. Click to expand... How does this handle: I am building a query the display records for the past month. Click to expand... The past month will be for only a single year. You code has the potential of returning multiple years, no just the past month..
M Mike375 Registered User. Local time Today, 10:18 Joined Aug 28, 2008 Messages 2,548 Mar 14, 2009 #23 PS, It produces the dates 1/02/2009 and 28/02/2009 so wonlt won't find 1/2/1966 etc
M Mike375 Registered User. Local time Today, 10:18 Joined Aug 28, 2008 Messages 2,548 Mar 14, 2009 #24 HiTechCoach said: How does this handle: The past month will be for only a single year. You code has the potential of returning multiple years, no just the past month.. Click to expand... I read past month I guesss in the context of birthdays, policy commencement dates and similar where the month itself is the issue as an anniversary. Any way, he has everything covered now
HiTechCoach said: How does this handle: The past month will be for only a single year. You code has the potential of returning multiple years, no just the past month.. Click to expand... I read past month I guesss in the context of birthdays, policy commencement dates and similar where the month itself is the issue as an anniversary. Any way, he has everything covered now
J Jman883 Registered User. Local time Yesterday, 19:18 Joined Jan 3, 2007 Messages 81 Mar 14, 2009 #25 Thanks for the help.