If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
date procedure
i need to know how to call an event procedure that will take a day in a month and give a number of days of difference to the end of the month.
|
#2
|
|||
|
|||
date procedure
Because February can have a different length every four years, I think you
should also specify the year. Public Function Days2EOM(dteDate As Date) As Integer 'Calculates the number of days till the end of the specified month Days2EOM = DateDiff("d", dteDate, DateSerial(Year(dteDate), Month(dteDate) + 1, 0)) End Function Regards, Graham R Seach Microsoft Access MVP Sydney, Australia Microsoft Access 2003 VBA Programmer's Reference http://www.wiley.com/WileyCDA/WileyT...764559036.html "imbackd" wrote in message news i need to know how to call an event procedure that will take a day in a month and give a number of days of difference to the end of the month. |
#3
|
|||
|
|||
date procedure
On Wed, 19 May 2004 17:11:03 -0700, imbackd wrote:
i need to know how to call an event procedure that will take a day in a month and give a number of days of difference to the end of the month. Why an event procedure? In a Query..... Difference: DateDiff("d",[ADate],DateSerial(Year([ADate]),Month([ADate])+1,0)) As control source in an unbound control: = DateDiff("d",[ADate],DateSerial(Year([ADate]),Month([ADate])+1,0)) -- Fred Please only reply to this newsgroup. I do not reply to personal email. |
Thread Tools | |
Display Modes | |
|
|