Solved

calender controls vfp

Posted on 2011-09-26
6
699 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 42

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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 42

Accepted Solution

by:
pcelba earned 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Choosing a core focus or particular set of features and options can be tough. To help out, we’re going to highlight a handful of things your business needs on one of your social media pages. In other words, if one of these is missing, you should imp…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

630 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