Re: Adding month end date
- From: "Alex Martinez" <alex_martinez@xxxxxxxxxxx>
- Date: Mon, 5 Sep 2005 21:50:10 -0700
Sandro/Douglas,
Thanks for your help.
Regards,
Alex
"Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx> wrote in message
news:eLzIMZksFHA.788@xxxxxxxxxxxxxxxxxxxxxxx
>
> "Sandro" <sandro_no_spam@xxxxxx> wrote in message
> news:eYEOARksFHA.3088@xxxxxxxxxxxxxxxxxxxxxxx
>>
>> "Alex Martinez" <alex_martinez@xxxxxxxxxxx> ha scritto nel messaggio
>> news:OvlbcyjsFHA.788@xxxxxxxxxxxxxxxxxxxxxxx
>>>
>>> Hi,
>>>
>>> I am using Access 2002 and I have two text boxes in my form that the
>>> user
>>> populates. The first text box called assigned date the user will put a
>> date
>>> for example September 5th 2005 and the second text box call month end.
>> What
>>> I want is when the user put a date in the assigned text box I want the
>> month
>>> end to become September 30th 2005. If the use inputes October 1st 2005
>> the
>>> month end box will automatically populates to October 31, 2005. Any
>>> tips
>>> will be appreicated. Thank you.
>>>
>>>
>> Hi Alex,
>>
>> try in this way. In the after update event of your text box where you put
>> the date ( September 5th 2005 ) write this code :
>>
>> me!yourEndMonthDate=DateSerial(Year(Format(YourTextBox, "yyyy/mm/mm")),
>> Month(Format(YourTextBox, "yyyy/mm/dd")) + 1, 0)
>>
>> YourTextBox is the textbox where you write September 5th 2005 and
>> yourEndMonthDate is the textbox where you want tha date of the end of
>> month.
>
> There's no reason to use the Format function on the data in the text
> boxes. If anything, CDate would be more appropriate:
>
> me!yourEndMonthDate=DateSerial(Year(CDate(YourTextBox)),
> Month(CDate(YourTextBox)) + 1, 0)
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
>
>
>
.
- References:
- Adding month end date
- From: Alex Martinez
- Re: Adding month end date
- From: Sandro
- Re: Adding month end date
- From: Douglas J. Steele
- Adding month end date
- Prev by Date: Re: Faster way to hide/unhide
- Next by Date: Re: Auto varying textboxs based on screen/window size
- Previous by thread: Re: Adding month end date
- Next by thread: Combo box for Searching
- Index(es):
Relevant Pages
|