Re: Adding month end date

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




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!)
>
>
>
>
>



.



Relevant Pages

  • Re: Creating search form to return results in report
    ... Allen Browne - Microsoft MVP. ... Are they check boxes? ... >> The sample database in the article shows the search results in the>> form, ... >>> name in one textbox, ...
    (microsoft.public.access.formscoding)
  • Re: Copying TextBox text
    ... Are you sure they are text boxes and not frames? ... PDF was always intended as a read only graphical format. ... Conversion to Word ... text box and grab the text out and delete the textbox. ...
    (microsoft.public.word.vba.general)
  • Re: Populate Textbox from a combobox
    ... best approach as I would need to produce reports down the road. ... Instead I converted it to 50 textbox controls. ... One solution is to make those text boxes hidden and place new 50 text ...
    (microsoft.public.access.formscoding)
  • Re: Copying TextBox text
    ... we're not working with the original pdf (so ... In terms of text boxes or frames: ... each text box and grab the text out and delete the textbox. ... without last paragraph mark ...
    (microsoft.public.word.vba.general)
  • Re: Copying TextBox text
    ... misinterpretation in the conversion). ... original pdf. ... In terms of text boxes or frames: ... text box and grab the text out and delete the textbox. ...
    (microsoft.public.word.vba.general)