Calendar on subform

AN60

Registered User.
Local time
Today, 11:56
Joined
Oct 25, 2003
Messages
283
I have asked this B4 but with no luck so I'll try my luck again.
I'm trying to use a calendar to select dates on a sub form and not getting anywhere. The calendar will work ok if I open the sub form on it's own but when I open the main form, which obviously has the sub form on it, the calendar will not work. I have used the following in the On Click of the calendar;

Private Sub cmdFrom_Click()
DoCmd.OpenForm "frmCalendar", , , , , acDialog, Me.name & ";From"
End Sub

The sub form name is Events Sub Form.
The main form name is Machinery
The date field the calendar is supposed to fill is From (nice & simple).

This has been working for me on numerous normal forms.

Access 2000
 
Last edited:
PH
I might have been a bit hasty in my first post and a thus misleading. I'm having the problem with the calendar button referencing the date field on the form.
 
I seem to be bogged down on this one. I have the calendar button on the subform and when I click on the button I get a message telling me that System can't find the sub form, then the calendar open up ok but will not work. I've tried to reference the sub form but obviously not successfully. Phew, I'm like that knife fighter in the gun fight someone spoke about in an earlier post!
 
Post the code for the onClick event of the button so we can look at it.
 
Private Sub cmdFrom_Click()
DoCmd.OpenForm "frmCalendar", , , , , acDialog, Me.name & ";From"
End Sub

The other details are in my original post above. "from" is a date field.
Thanks vm for your help.
 
When you double click in this field it will return the date to it, no matter where the field is ie: form subform etc

Dave
 

Attachments

Oldsoftboss
I've been busy on other things and it's been a while getting around to reading this post. Anyway after solving other problems & fine tuning the db's a bit I'm finally back on this subject. Thank you for your simple calendar, it works perfectly on all the subs I have hooked it to.
 

Users who are viewing this thread

Back
Top Bottom