Hi,
Can someone please help me with my calendar function? I'm using access 2003 by the way.
Here is my problem: I have a receiver database that user will enter date of items received in a text box. It is set up as today's date, but user can change it to a back date. Now I want to create a function that check if today's date fall in whatever financial calendar month then user can't back dated later than that month financial calendar month.
for example, if today is 5/7/2012, then user only able to back dated this field from 4/30/12 to 5/6/2012.
here is my function for starter and I know it's wrong and I can't seems to figure it out
could someone please help me?
Thank you in advance
Can someone please help me with my calendar function? I'm using access 2003 by the way.
Here is my problem: I have a receiver database that user will enter date of items received in a text box. It is set up as today's date, but user can change it to a back date. Now I want to create a function that check if today's date fall in whatever financial calendar month then user can't back dated later than that month financial calendar month.
for example, if today is 5/7/2012, then user only able to back dated this field from 4/30/12 to 5/6/2012.
here is my function for starter and I know it's wrong and I can't seems to figure it out
Code:
Function fCalAcctgDate(dteRcvDate) as date If dteRcvDate >= #4/2/2012# And dteRcvDate <= #4/29/2012# Then fCalAcctgDate between #4/2/2012# and #4/29/2012# ElseIf dteRcvDate >= #4/30/2012# And dteRcvDate <= #5/27/2012# Then fCalAcctgDate between #4/30/2012# and #5/27/2012# Else fCalAcctgDate = Null End If End Function
Thank you in advance
Comment