473,394 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Popup Calendar Question

A while back I had found a link to a popup calendar that had a small
button that was placed to the right of any text box. By clicking on
the icon and selecting a date the text box was updated with that date.
You were able to use the icon (button) on multiple text boxes on the
form. I have lost the link and can't find any reference to it on my
machine.

Could someone lead me in the right direction?

Thank you.
Dec 1 '06 #1
4 2942
Using http://groups.google.com to search this and some microsoft.public...
newsgroups on "calendar control" "calendar form" or "date picker" will give
you more references than you'll want to pursue. From my own personal
experience, MVP Arvin Meyer has a data picker at his site
http://www.datastrat.com, MVP Stephen Lebans has a date picker at his site
http://www.lebans.com, and Drew Wutka has one at his site
http://www.wolfwares.com. But there are many, many others, in addition to
the calendar control distributed with recent versions of Access (if I am
correct, that distributed control is an ActiveX and I'd prefer one
implemented with native features of Access).

All of these, if memory serves, are implemented with forms and controls that
are native to Access, and do not introduce the complications that can result
from using ActiveX controls to extend Access' capability.

Larry Linson
Microsoft Access MVP
"ShyGuy" <sh****@shytown.comwrote in message
news:oq********************************@4ax.com...
>A while back I had found a link to a popup calendar that had a small
button that was placed to the right of any text box. By clicking on
the icon and selecting a date the text box was updated with that date.
You were able to use the icon (button) on multiple text boxes on the
form. I have lost the link and can't find any reference to it on my
machine.

Could someone lead me in the right direction?

Thank you.

Dec 1 '06 #2
Thanks for your reply. I had done a bit of searching before posting
here, but have been unable to find the popup calendar that I had seen.
I remember a module or two and you could just copy the Icon (button)
to the right of as many text boxes as you liked. That was the part I
really liked about it. I did find one that was similar but you have
to place a line of code behind each instance. Not a big deal. I
know. ;-) I'll probobly wind up using this one.

Thanks again for your help.
On Fri, 01 Dec 2006 04:27:15 GMT, "Larry Linson"
<bo*****@localhost.notwrote:
>Using http://groups.google.com to search this and some microsoft.public...
newsgroups on "calendar control" "calendar form" or "date picker" will give
you more references than you'll want to pursue. From my own personal
experience, MVP Arvin Meyer has a data picker at his site
http://www.datastrat.com, MVP Stephen Lebans has a date picker at his site
http://www.lebans.com, and Drew Wutka has one at his site
http://www.wolfwares.com. But there are many, many others, in addition to
the calendar control distributed with recent versions of Access (if I am
correct, that distributed control is an ActiveX and I'd prefer one
implemented with native features of Access).

All of these, if memory serves, are implemented with forms and controls that
are native to Access, and do not introduce the complications that can result
from using ActiveX controls to extend Access' capability.

Larry Linson
Microsoft Access MVP
"ShyGuy" <sh****@shytown.comwrote in message
news:oq********************************@4ax.com.. .
>>A while back I had found a link to a popup calendar that had a small
button that was placed to the right of any text box. By clicking on
the icon and selecting a date the text box was updated with that date.
You were able to use the icon (button) on multiple text boxes on the
form. I have lost the link and can't find any reference to it on my
machine.

Could someone lead me in the right direction?

Thank you.
Dec 1 '06 #3
ShyGuy wrote:
A while back I had found a link to a popup calendar that had a small
button that was placed to the right of any text box. By clicking on
the icon and selecting a date the text box was updated with that date.
You were able to use the icon (button) on multiple text boxes on the
form. I have lost the link and can't find any reference to it on my
machine.

Could someone lead me in the right direction?

Thank you.
Here's something I tried in A97. I'm not sure I'm doing it even close
to correctly, but it was fun trying.

frmDateIntoTextbox

txtFillFromPopup1 cmdTest1 (.Top = 0.5" for both)
txtFillFromPopup2 cmdTest2 (.Top = 0.8" for both)

'---Code behind frmDateIntoTextbox---
Option Compare Database
Option Explicit

Private Sub cmdTest1_Click()
DoCmd.OpenForm "frmPopupDatePicker"
End Sub

Private Sub cmdTest2_Click()
DoCmd.OpenForm "frmPopupDatePicker"
End Sub
'---End Code behind frmDateIntoTextbox---

frmPopupDatePicker (modal)

Built-in ActiveX Calendar control called PopUpDatePicker
cmdDone

'---Code behind frmPopupDatePicker---
Option Compare Database
Option Explicit

Dim MyClass As clsSelectedDate
Const TwipsPerInch = 1440

Private Sub cmdDone_Click()
DoCmd.Close acForm, Me.Name
End Sub

Private Sub Form_Load()
Set MyClass = New clsSelectedDate
MyClass.SelectedDate = Date
PopUpDatePicker.Value = Date
End Sub

Private Sub Form_Unload(Cancel As Integer)
Dim ctl As Control

For Each ctl In Forms!frmDateIntoTextbox
If ctl.ControlType = acTextBox And Abs(ctl.Top - _
Forms!frmDateIntoTextbox.ActiveControl.Properties( "Top")) _
< 0.1 * TwipsPerInch Then
ctl.Value = MyClass.SelectedDate
End If
Next ctl

End Sub

Private Sub PopUpDatePicker_AfterUpdate()
MyClass.SelectedDate = PopUpDatePicker.Value
End Sub
'---End Code behind frmPopupDatePicker---

clsSelectedDate

'---Code in clsSelectedDate---
Option Compare Database
Option Explicit

Private mSelectedDate As Date

Public Property Let SelectedDate(dtIn As Date)
mSelectedDate = dtIn
End Property

Public Property Get SelectedDate() As Date
SelectedDate = mSelectedDate
End Property
'---End Code in clsSelectedDate---

When frmDateIntoTextbox is opened and one of the command buttons is
clicked, the form with the calendar control is opened. When cmdDone is
clicked, the date that was selected gets placed into any textboxes that
are vertically close to the command button that was clicked. I didn't
feel like trying to put the command buttons into a class. This might
not be even close to what you're looking for.

James A. Fortune
CD********@FortuneJames.com

Dec 1 '06 #4
On 1 Dec 2006 01:00:54 -0800, CD********@FortuneJames.com wrote:
>ShyGuy wrote:
>A while back I had found a link to a popup calendar that had a small
button that was placed to the right of any text box. By clicking on
the icon and selecting a date the text box was updated with that date.
You were able to use the icon (button) on multiple text boxes on the
form. I have lost the link and can't find any reference to it on my
machine.

Could someone lead me in the right direction?

Thank you.

Here's something I tried in A97. I'm not sure I'm doing it even close
to correctly, but it was fun trying.

frmDateIntoTextbox

txtFillFromPopup1 cmdTest1 (.Top = 0.5" for both)
txtFillFromPopup2 cmdTest2 (.Top = 0.8" for both)

'---Code behind frmDateIntoTextbox---
Option Compare Database
Option Explicit

Private Sub cmdTest1_Click()
DoCmd.OpenForm "frmPopupDatePicker"
End Sub

Private Sub cmdTest2_Click()
DoCmd.OpenForm "frmPopupDatePicker"
End Sub
'---End Code behind frmDateIntoTextbox---

frmPopupDatePicker (modal)

Built-in ActiveX Calendar control called PopUpDatePicker
cmdDone

'---Code behind frmPopupDatePicker---
Option Compare Database
Option Explicit

Dim MyClass As clsSelectedDate
Const TwipsPerInch = 1440

Private Sub cmdDone_Click()
DoCmd.Close acForm, Me.Name
End Sub

Private Sub Form_Load()
Set MyClass = New clsSelectedDate
MyClass.SelectedDate = Date
PopUpDatePicker.Value = Date
End Sub
Thnaks for the reply. I will have to study your code. But I did
finally find the code I was looking for at
http://www.peterssoftware.com/prx.htm

Import some modules and 1 form and paste the icon (button) to the
right of any text box and your done. Works beautifully.
>Private Sub Form_Unload(Cancel As Integer)
Dim ctl As Control

For Each ctl In Forms!frmDateIntoTextbox
If ctl.ControlType = acTextBox And Abs(ctl.Top - _
Forms!frmDateIntoTextbox.ActiveControl.Properties( "Top")) _
< 0.1 * TwipsPerInch Then
ctl.Value = MyClass.SelectedDate
End If
Next ctl

End Sub

Private Sub PopUpDatePicker_AfterUpdate()
MyClass.SelectedDate = PopUpDatePicker.Value
End Sub
'---End Code behind frmPopupDatePicker---

clsSelectedDate

'---Code in clsSelectedDate---
Option Compare Database
Option Explicit

Private mSelectedDate As Date

Public Property Let SelectedDate(dtIn As Date)
mSelectedDate = dtIn
End Property

Public Property Get SelectedDate() As Date
SelectedDate = mSelectedDate
End Property
'---End Code in clsSelectedDate---

When frmDateIntoTextbox is opened and one of the command buttons is
clicked, the form with the calendar control is opened. When cmdDone is
clicked, the date that was selected gets placed into any textboxes that
are vertically close to the command button that was clicked. I didn't
feel like trying to put the command buttons into a class. This might
not be even close to what you're looking for.

James A. Fortune
CD********@FortuneJames.com
Dec 2 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: mkobus | last post by:
Im relatively new, so please be patient with me... I need to update a parent .aspx screen from a popup and close the popup. Normally I would use...
6
by: Kelvin Nguyen | last post by:
Hi everyone I'm making page which will provide date for the user. I would like to use calendar provided by .NET. It should look like this ----------------- (icon) I would like to know...
4
by: Ali | last post by:
i am using visual studio 2005 and I am trying to create a popup calender so when a user click on a image on the main form, a calender will then popup, the user will select a date and the date will...
3
by: Peter | last post by:
Does anyone have an example of how you would do a popup window when a user clicks on a day number link in the ASP.NET Web Calendar control? I am trying to create an event calendar similar to how...
0
by: R.A.M. | last post by:
Hello, I need to implement popup calendar in ASP.NET application. I created a button opening popup calendar on 'master' page: <asp:Button ID="Calendar" runat="server" Text=Calendar"...
1
by: R.A.M. | last post by:
Hello, I need to implement popup calendar in ASP.NET application. I created a button opening popup calendar on 'master' page: <asp:Button ID="Calendar" runat="server" Text=Calendar"...
0
by: GV | last post by:
Hi all, New to developing in VS 2005 ASP 2.0 Trying to have a easy pop calender for a button on a web page. I keep getting a error message in IE6 that says: Line 69 Char 3 Error:...
2
by: Alex Lee | last post by:
HI all: newbie question here -- Does anyone know how google calendar display a popup textbox when you click on the quick add link? For those who have not seen google calendar -- the function can...
3
by: mikaint | last post by:
I'm really confused here...i'll need some help with the following... i have a sceipt that will open a popup win which is actually a calendar and i'm trying to apply a style on the popup... Here's...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.