Could someone lead me in the right direction?
Thank you.
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" <shy...@shytown.com> wrote in message
news:oqavm292ot0gl41jf...@4ax.com...
Thanks again for your help.
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
CDMAP...@FortuneJames.com
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.