Updating DateSerial function in Control Source (1 Viewer)

yuccakid

New member
Local time
Today, 21:43
Joined
Apr 28, 2000
Messages
9
I have a form that shows from and through dates. The from date is a fixed date - "Patient admission date" through "the last day of the previous month" previous to the "current" date. My current DateSerial function is =DateSerial(2000,5,1-1). Can I automatically update the "month" and "year"?
 

R. Hicks

AWF VIP
Local time
Today, 15:43
Joined
Dec 23, 1999
Messages
619
I assume you wish to use the current Month and Year from the computer's current date. If this is true, try this:

=DateSerial(Year(Now()),Month(Now()),1-1)

HTH
RDH
 

yuccakid

New member
Local time
Today, 21:43
Joined
Apr 28, 2000
Messages
9
Thanks very much. The online help showed DateSerial Function would only work with "numeric" input (year "2000", Month "5") and so on. It works perfectly.
 

Users who are viewing this thread

Top Bottom