Calendar Control

S

Simon Harris

Hi All,

I have a calendar control on a form, which has this event on click:

Private Sub Calendar_Click()
CalendarOriginator.Value = Me.Calendar.Value
CalendarOriginator.SetFocus
Me.Calendar.Visible = False
Set CalendarOriginator = Nothing
End Sub

This has worked fine on my PC (XP Pro/Office 2003 Pro SP2) during
development. When I put it on a clients PC, the calendar does nothing when
clicked. It worked AOK on a different clients PC until recently, when the
same problem occured. I have got the exact database back onto my PC, and it
works fine!

Any ideas anyone? Would be much appreciated as I dont geddit! :)

Cheers!
Simon.
 
A

Allen Browne

This is very common with the Calendar Control. Ultimately it is due to
broken references - references that either aren't installed on the computer,
or are the wrong version.

You can track down the broken references and fix them using the approach
here:
http://allenbrowne.com/ser-38.html

But the better solution would be to dump the calendar control, and just use
a little Access form as a calendar, so it works on all computers and
versions of Access, without the versioning and referencing problems. There's
one here you can download and use:
http://allenbrowne.com/ser-51.html
 
B

Bob Seymour

That's a great calendar Allen, works a treat. A quick question - if I had a
form with a sub-form attached and one of the links was the date, could I use
your calendar on the main form to automatically fill both dates?
TIA
Bob S
 
A

Allen Browne

You could put the button for the calendar on the main form is you used the
full reference to refer to the date/time text box in the subform, e.g.:
=CalendarFor([Forms].[MyMainform].[MySubform].[Form].[MyTextBox], "Enter
a date")
 

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