|
 |
access thread: Calculate the last day of the month
Message #1 by robeetpotts1@h... on Thu, 29 Aug 2002 09:17:05
|
|
Hi,
Is there a way to make a feild enter the last day of the month when a user
just enters the month and year. Currently when Jun-02 is entered the form
returns 02-06-02, I want it to say 30-06-02.
Thanks in advance
Rob!
Message #2 by "Tim Maher" <tim.maher@s...> on Thu, 29 Aug 2002 09:14:12 +0100
|
|
Hi Rob,
his seems to work fine for me :
'Get current date from system
Dim Temp_Date As Date
Temp_Date = Date
'Calculate last day of current month
End_Of_Current_Month = DateSerial(Year(Temp_Date), Month(Temp_Date) +
1, 0)
Hope this works
Tim
>>> robeetpotts1@h... 08/29/02 09:17am >>>
Hi,
Is there a way to make a feild enter the last day of the month when a
user
just enters the month and year. Currently when Jun-02 is entered the
form
returns 02-06-02, I want it to say 30-06-02.
Thanks in advance
Rob!
This e-mail transmission is strictly confidential and intended solely
for the person or organisation to who it is addressed. It may contain
privileged and confidential information and if you are not the
intended recipient, you must not copy, distribute or take any action
in reliance on it.
If you have received this email in error, please notify us as soon as
possible and delete it.
This e-mail has been scanned using Anti-Virus software, however,
Swansea NHS Trust accept no responsibility for infection caused by
any virus received on the recipients system.
Message #3 by robeetpotts1@h... on Thu, 29 Aug 2002 09:59:54
|
|
>Hi Tim,
Can you please explain how you have this set up, i.e what feilds you have
in your table, what feilds are on the form and where you put this function.
Rob
Hi Rob,
his seems to work fine for me :
'Get current date from system
Dim Temp_Date As Date
Temp_Date = Date
'Calculate last day of current month
End_Of_Current_Month = DateSerial(Year(Temp_Date), Month(Temp_Date) +
1, 0)
Hope this works
Tim
|
|
 |