pick date from calendar for a date field

stephen81

Registered User.
Local time
Today, 09:24
Joined
Nov 27, 2002
Messages
198
I have a form set up with various date fields and I have set up a form with a calender to fill one of the date fields on my main form. I am opening the calender form by doube clicking on the text box. I am using a command button on my calender form with
Code:
Forms![Rec_Customer]![Date1] = Me.Calender_Control.Value
DoCmd.Close acForm, "Calender"
on the OnClick event to fill my date in.

Is there a way of having the setting the text box depending on the text box I click on?
i.e. Only have one calender form, and pass the name of the text box to the calender form when I double click on the text box, instead of having a separate calender form for each text box I want to fill with a date.
 
stephen, have a look at my PopUp Calendar example in the Sample Databases forum.
 
Thanks Mile-o-phile. Yet again, you've really helped me out. The problem I've got now, is that I want to use the pop up calender on a sub form I have on my main form as well, however, because of the way subforms are referenced, the code doesn't work. Is there an easy fix to this, or would I be better off just making a separate calendar form for my subform?
 

Users who are viewing this thread

Back
Top Bottom