Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

calender controls vfp

Posted on 2011-09-26
6
Medium Priority
?
715 Views
Last Modified: 2012-05-12
HI: A big question. Max points because this may need a bit of hand holding.
I need to add a calender control to a form. When a user selects a date field a form opens with a calender displayed. Selecting a date returns the date selected to the field on the form.
Please beware - I have looked at this but the concept of classes is way over my head. I am afraid you may need to be patient. Explain how to do every step.
If anybody has  a 'dummies do calender controls' document I would be grateful!
Also it may not be tackled all in one day.
You have been warned!
Thanks!
0
Comment
Question by:ClaytonGlass
  • 3
  • 2
6 Comments
 
LVL 43

Expert Comment

by:pcelba
ID: 36598952
The easiest way is to use following command:
ACTIVATE WINDOW calendar
The date selected is then in _diarydate  system variable.

More complicated sample is in Task Pane Manager - Solution/Samples - Foundation Classes - Add data-bound calendar.

And if you need expert advice then read page 9 of this book: http://www.hentzenwerke.com/catalog/megafox.htm
or page 118 of this book: http://www.hentzenwerke.com/catalog/kilofox.htm

This also could work: http://fox.wikis.com/wc.dll?Wiki~CalendarControl
http://fox.wikis.com/wc.dll?Wiki~Diary/Calendar
0
 

Author Comment

by:ClaytonGlass
ID: 36599063
Thanks, pcelba (again). I did look in the wikis but got lost very quickly.
did find ACTIVATE WINDOW a few minutes ago..but just hold my hand a little...this is the code I have put on a button on the form:
ACTIVATE WINDOW CALENDAR
due = _DIARYDATE
THISFORM.DUE1.Value = due
Which sets the date currently in the calendar.
To reset the date to one of choice I have to select the date in the calendar, close the calendar, and click the button again. Is this right? Or can I change the date without having to reclick?
Thanks!
0
 
LVL 12

Expert Comment

by:jrbbldr
ID: 36599228
When a user selects a date field a form opens with a calender displayed

Do you really need the Calendar to open in its own separate FORM?
Or can a Calendar object open on the existing Form thereby allowing the user to select the date?

If the later then you can just add the Microsoft Date and Time Picker Control object to your Form.

With more clarification we can better assist you.

Good Luck


0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:ClaytonGlass
ID: 36599300
Ideally calendar object on the same form.....I have added MSComCtl2 to my object browser but am lost as to what to do next....and when I close the browser Iose the object (I warned you I was dumb)
0
 
LVL 43

Accepted Solution

by:
pcelba earned 2000 total points
ID: 36599582
The Calendar window will display whatever date you assign to _diarydate.
0
 

Author Closing Comment

by:ClaytonGlass
ID: 36599595
Thanks, jbblbr but I have gone with pcelba.
I appreciate that the date/time picker may look great but I just like the foxpro one. I do like the diary content part, too!
Thanks to all concerned for their help
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question