"Pop-up" Calendar

G

Guest

I have a form with a text box, [DueDate],that the user enters a date into. I
want to make a "pop-up" calendar available for the user to select a date. I
put a command button next to the text box with the code:

Private Sub btnCalendar_Click()
Me.Calendar1.Visible = True
End Sub

I also have a Calendar (using Access' built-in one) that is set to be
invisible by default. The code I'm using for it is:

Private Sub Calendar1_Click()
Me.DueDate = Me.Calendar1.Value
Me.DueDate.SetFocus
Me.Calendar1.Visible = False
End Sub

This code is designed to have [DueDate] take the value clicked on by the
user and then make the calendar disappear. Everything works fine, except
when the user changes the month and/or year with the drop-down menus at the
top of the calendar. If the user changes one of these and then selects a
date, the calendar will disappear, and focus will be set to [DueDate], but
the value of [DueDate] will not be changed to what the user selected. It
simply remains as it was before. Any idea what I'm doing wrong? Thanks in
advance for any replies.
 
G

Guest

Thanks for pointing me in the right direction, those DBs are very helpful.

Jeff Conrad said:
Here are some calendar links that should help you solve the issue:

http://home.bendbroadband.com/conradsystems/accessjunkie/calendars.html

Personally I would use option one on that page and not use
the ActiveX calendar that you are currently using.
(Just my opinion)

--
Jeff Conrad
Access Junkie
http://home.bendbroadband.com/conradsystems/accessjunkie.html
http://www.access.qbuilt.com/html/articles.html

in message:
I have a form with a text box, [DueDate],that the user enters a date into. I
want to make a "pop-up" calendar available for the user to select a date. I
put a command button next to the text box with the code:

Private Sub btnCalendar_Click()
Me.Calendar1.Visible = True
End Sub

I also have a Calendar (using Access' built-in one) that is set to be
invisible by default. The code I'm using for it is:

Private Sub Calendar1_Click()
Me.DueDate = Me.Calendar1.Value
Me.DueDate.SetFocus
Me.Calendar1.Visible = False
End Sub

This code is designed to have [DueDate] take the value clicked on by the
user and then make the calendar disappear. Everything works fine, except
when the user changes the month and/or year with the drop-down menus at the
top of the calendar. If the user changes one of these and then selects a
date, the calendar will disappear, and focus will be set to [DueDate], but
the value of [DueDate] will not be changed to what the user selected. It
simply remains as it was before. Any idea what I'm doing wrong? Thanks in
advance for any replies.
 
G

Guest

Thank you so much Jeff!! I read all weekend trying to get a pop up calendar
- yippee - the most helpful link was
http://www.fontstuff.com/access/acctut09.htm as it was very step by step,
which I needed since I have no none nil nada experience adding code.

Thank you so much :)

Jeff Conrad said:
Here are some calendar links that should help you solve the issue:

http://home.bendbroadband.com/conradsystems/accessjunkie/calendars.html

Personally I would use option one on that page and not use
the ActiveX calendar that you are currently using.
(Just my opinion)

--
Jeff Conrad
Access Junkie
http://home.bendbroadband.com/conradsystems/accessjunkie.html
http://www.access.qbuilt.com/html/articles.html

in message:
I have a form with a text box, [DueDate],that the user enters a date into. I
want to make a "pop-up" calendar available for the user to select a date. I
put a command button next to the text box with the code:

Private Sub btnCalendar_Click()
Me.Calendar1.Visible = True
End Sub

I also have a Calendar (using Access' built-in one) that is set to be
invisible by default. The code I'm using for it is:

Private Sub Calendar1_Click()
Me.DueDate = Me.Calendar1.Value
Me.DueDate.SetFocus
Me.Calendar1.Visible = False
End Sub

This code is designed to have [DueDate] take the value clicked on by the
user and then make the calendar disappear. Everything works fine, except
when the user changes the month and/or year with the drop-down menus at the
top of the calendar. If the user changes one of these and then selects a
date, the calendar will disappear, and focus will be set to [DueDate], but
the value of [DueDate] will not be changed to what the user selected. It
simply remains as it was before. Any idea what I'm doing wrong? Thanks in
advance for any replies.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top