473,322 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How to add a calendar to a date field in a form to allow users select date

8
Hi All,

Please help me to understand if I can add calendar to a date field in forms which will allow users to enter the date.

Regards,
TK
Jun 22 '07 #1
5 4267
Hi All,

Please help me to understand if I can add calendar to a date field in forms which will allow users to enter the date.

Regards,
TK
I found the following link to be helpful.

Calendar

AO3
Jun 22 '07 #2
missinglinq
3,532 Expert 2GB
The simplest way is:

Expand|Select|Wrap|Line Numbers
  1. Private Sub YourCalendarName_Click()
  2.    YourTextBoxName = YourCalendarName
  3. End Sub
Jun 22 '07 #3
missinglinq
3,532 Expert 2GB
If you'd like to only have the calendar appear when you need to pick a date, you can use this routine.

First, 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. Private Sub YourCalendarName_Click()
  5.   YourTextBoxName = YourCalendarName
  6.   YourTextBoxName.SetFocus
  7.   YourCalendarName.Visible = False
  8. End Sub
  9. Private Sub YourTextBoxName_DblClick(Cancel As Integer)
  10.   YourCalendarName.Visible = True
  11. End Sub
  12.  
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!
Jun 22 '07 #4
tkba
8
Thanks a lot for the help
Jun 22 '07 #5
missinglinq
3,532 Expert 2GB
That's why we're all here! ;0)>
Jun 22 '07 #6

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

Similar topics

10
by: vinu | last post by:
I have a javascript file named select.js. This is a file which is use to pop up a calendar, when clicked on a calendar icon in an ASP file. have a close button in the calendar. When i click on the...
8
by: Shyguy | last post by:
Is it possible to create a calendar that shows previous input data and also allows for input of new data?
1
by: jim_parent_804 | last post by:
Good morning: I created a data entry form that has been working well, and needed to redesign it. The form is called, and now the first field to be filled in is a date using the MSCAL.Calendar.7...
3
by: thorpk | last post by:
I posted this problem earlier in the month and some one decided it was better to change the subject and ask a completely different question. I am therefore reposting. I am hoping some one can...
14
by: magmike | last post by:
Can I do anything with the calendar buttons? I want to display a number on the buttons. I'm using the calendar control on a form that sets a call back date and time. The user can click on the...
1
by: jamesker | last post by:
Hi, I have a continuous form with a date field in it. beside the date field, i've made a command button that when pressed, displays a calendar form which allows users to choose a date, once a...
1
by: swethak | last post by:
Hi, I am desiging the calendar application for that purpose i used the below code. But it is for only displys calendar. And also i want to add the events to calendar. In that code displys the...
1
by: swethak | last post by:
hi, i have a code to disply the calendar and add events to that. It works fine.But my requirement is to i have to disply a weekly and daily calendar.Any body plz suggest that what modifications i...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.