No problem. Glad I could help.
Later,
bware
-----Original Message-----
From: Talon Wolles [mailto:ta_iwo@y...]
Sent: Sunday, December 15, 2002 6:28 PM
To: professional vb
Subject: [pro_vb] RE: inputing date from calendar month display
Bwarehouse, thank you very much for your down-to-earth
explanation. It really works. Thank you once again. I
also thank others who contributed. Your contributions
gave me an insight.
-Talon
--- bwarehouse <bwarehouse@y...> wrote:
> Sorry about that.. Yes. The calendar is MS ActiveX
> Calendar Control 7x, 9x
> or 10x will work..
> let me clarify..
> Say you have txtbox1 which is the date field, and a
> calendar control named
> calctl.
> Don't bind txtbox1 to calctl, don't set a default
> value for calctl, but set
> the visible property of calctl to "No"
> In the GotFocus event of txtboxl
> '********code txtbox1 GotFocus begin***********
> Me.calctl.visible = True 'displays the
> calendar
> IF IsNull([txtbox1]) Then
> Me.calctl.value = Now() 'or you could
> use Date(), anyway, it
> sets the calendar to today's date, but doesn't
> change the textbox.
> ELSE
> Me.calctl.value = txtbox1 'if the textbox
> already has a date, the
> calendar will use that same date as it's opening
> date.
> END IF
> '********code txtbox1 GotFocus end***********
>
> '********code calctl OnClick begin***********
> Me.txtbox1 = calctl.value 'sets the
> textbox date to the value
> click on the calendar
> Msgbox "Date changed. To move to the next field,
> place your cursor over the
> date in the text box"
> '********code calctl OnClick end***********
>
> '********code txtbox1 MouseMove begin***********
> IF calctl.visible = True And txtbox1 = calctl.value
> THEN
> Me.calctl.visible = FALSE
> 'hides the calendar, and the
> next line of code moves to the next enabled control
> on the form
> VbTabKey 'check this tab
> command, it may be a little
> off, I am to exhausted to check
> END IF
> '********code txtbox1 MouseMove end***********
> HOPE this helps,
> Later,
> bware
>
>
>
>
>
>
> Later,
> bware
>
> -----Original Message-----
> From: Talon Wolles [mailto:ta_iwo@y...]
> Sent: Friday, December 13, 2002 7:43 PM
> To: professional vb
> Subject: [pro_vb] RE: inputing date from calendar
> month display
>
> Thanks bware. But can you please elaborate. Is
> Calender a control or what?
>
>
> -Talon
>
>
> --- bwarehouse <bwarehouse@y...> wrote:
> > On open event of the calendar
> > Calender.value = txtbox1
> >
> >
> > Later,
> > bware
> >
> >
> >
> > -----Original Message-----
> > From: Talon Wolles [mailto:ta_iwo@y...]
> > Sent: Wednesday, December 11, 2002 5:14 PM
> > To: professional vb
> > Subject: [pro_vb] inputing date from calendar
> month
> > display
> >
> > Hi all,
> >
> > I have a problem. I want to input a date to a text
> > field such that as the text field gets focus, the
> > user
> > enters the date manually or presses Enter to
> display
> > the full calendar month where he can now click the
> > day
> > of the month.
> > I know this is possible as I have seen it before
> but
> > can't remember. I write in VB6.
> >
> > Thanks.
> >
> > -Talon
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> > now.
> > http://mailplus.yahoo.com
> >
> >
> >
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> http://mailplus.yahoo.com
>
>
>
>
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com