Quote:
Originally Posted by Gwyar
Hi Missling
I was so hoping this was going to work.. But it wants me to 'Enter Parameter Values' of Date and vbMonday
Guess I cant even copy and paste
myle
I am trying to figure this out...
Where does this go?
Code:
Function WEEKENDMON(dat) As Date
If IsNull(dat) Then Exit Function
dat = DateSerial(Year(dat), Month(dat), Day(dat))
If dat Mod 7 > 0 Then
WEEKENDMON = dat - dat Mod 7 + 9
Else
WEEKENDMON = dat+2
End If
End Function
Where does this go?
monweek:WEEKENDMON([afeilddatevalue])
And lastly, you guessed it.. where does this go?
=WEEKENDMON(Now())
Sorry to make you repeat yourself but I'm having a hard time with this one.
Thank you very much
Tracy
================
I'm using 2007.
Also looking on you tube for video lessons on functions too 
|
haven't played with 07 yet
try this
open the msaccess file and click on MODULES click New
then paste above code into the open window close it it should ask you to save it yes
then Open a Query window put a table in there drop some feild in
where you put the feild you should be able to type
monweek:WEEKENDMON([????])
???? = a feildname from the table that is a date value
run new query if working there be a new coloum call monweek
which should have mon's date in base on the ????
praying it working
then desgin the query again and in the Where part of the query
put below the monweek feild =WEEKENDMON(Now())
run again and you should only see next monday data in the output