473,407 Members | 2,359 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,407 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 4276
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.