Prev: Chart source setting with VBA
Next: luanch center
From: Irshad Alam on 15 Apr 2010 05:41 I have a command button and 2 text field : On click event I need Text1 to get the first date of the current year (like 01-01-2010) and Text2 to get end date of the current year (like 31-12-2010) Please advice Regards Irshad
From: XPS350 on 15 Apr 2010 06:36 On Apr 15, 11:41 am, Irshad Alam <IrshadA...(a)discussions.microsoft.com> wrote: > I have a command button and 2 text field : > > On click event I need Text1 to get the first date of the current year (like > 01-01-2010) and Text2 to get end date of the current year (like 31-12-2010) > > Please advice > > Regards > > Irshad You can use the DateSerial function: DateSerial (Year(Date(),1,1) and DateSerial (Year(Date(),12,31) Groeten, Peter http://access.xps350.com
From: Mike Painter on 15 Apr 2010 16:01 Irshad Alam wrote: > I have a command button and 2 text field : > > On click event I need Text1 to get the first date of the current year > (like 01-01-2010) and Text2 to get end date of the current year (like > 31-12-2010) > Text1 = #01 01# text2 = #31 12# should work. Access defaults to the current year if it in not specified. If they have to do it all the time set the defaults to the above and get rid of the button.
|
Pages: 1 Prev: Chart source setting with VBA Next: luanch center |