By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,504 Members | 1,583 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,504 IT Pros & Developers. It's quick & easy.

Access 2003 - Calendar

P: 2
For 2003, is there a way to have a little calendar pop up when a date is required for a field? How do you create/modify?
Jan 2 '08 #1
Share this Question
Share on Google+
6 Replies


missinglinq
Expert 2.5K+
P: 3,532
If you'd like to only have the calendar appear when you need to pick a date, you can use this routine.

YourTextBoxName is the name of the box that will hold the date

YourCalendarName is the name of your calendar.

First, place the calendar where you want it to appear on the form.

Next, select the calendar and goto Properties--Format and set Visible = No

Then place this code in the form's code module:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.    YourCalendarName = Date
  3. End Sub
  4.  
  5. Private Sub YourTextBoxName_DblClick(Cancel As Integer)
  6.   YourCalendarName.Visible = True
  7. End Sub
  8.  
  9. Private Sub YourCalendarName_Click()
  10.    YourTextBoxName = YourCalendarName
  11.    YourTextBoxName.SetFocus
  12.    YourCalendarName.Visible = False
  13. End Sub
  14.  
Now, when your user DoubleClicks on the textbox where the date will go, the calendar will appear. The date is picked, and the calendar disappears!

Welcome to TheScripts!

Linq ;0)>
Jan 2 '08 #2

P: 2
Gracias! This makes sense. I am still stuck on 'how' to create the calendar.
Jan 7 '08 #3

missinglinq
Expert 2.5K+
P: 3,532
While there are calendars available on line, they require what I'm guessing is a little more experience in coding than you have at this point in time. The simplest way is to go into your form's Design View, on the toolbar goto Insert - ActiveX Control and scroll down to Calendar Control then click on OK. The calendar should now be on your form. Move it where you will like any other control.

Linq ;0)>
Jan 7 '08 #4

MMcCarthy
Expert Mod 10K+
P: 14,534
While there are calendars available on line, they require what I'm guessing is a little more experience in coding than you have at this point in time. The simplest way is to go into your form's Design View, on the toolbar goto Insert - ActiveX Control and scroll down to Calendar Control then click on OK. The calendar should now be on your form. Move it where you will like any other control.

Linq ;0)>
Actually Linq,

It's probably easier to use Allen Brownes calendar as the ActiveX one creates so many problems.

Mary :)
Jan 8 '08 #5

missinglinq
Expert 2.5K+
P: 3,532
Easier for you and me, maybe, but not necessarily for everyone!

Linq ;0)>
Jan 8 '08 #6

MMcCarthy
Expert Mod 10K+
P: 14,534
Easier for you and me, maybe, but not necessarily for everyone!

Linq ;0)>
True :D
Jan 8 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.