Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Picker 1

Status
Not open for further replies.

LeonelSanchezJr

Programmer
Jan 26, 2001
522
US
Is there a date picker in Visual FoxPro?

Something that drops down a calendar box for the user to choose from?
 
Hi
There is a _datetime.vcx in Visual FoxPro Catalog\Foundation Classes\Data/Time
You can see a sample under...
Sample ...\Samples\Vfp98\Solution\Ffc\datacal.scx
Hope this helps you ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
I found a Microsoft Active X control within Visual Foxpro and it's the one I have used before. It is named:

MSCOMCTL2.DTPIKCER.2

My only problem now, is that I can not reference the value chosen by the user.

I get the following error: "Unknown member" when I do this:

mstartdate = ThisForm.StartDate.Value
 
First, ensure the Name property of the OLEControl is StartDate. This is typically the source of an "Unknown Member" error.

Next, try:
mstartdate = ThisForm.StartDate.Object.Value

Although, omitting the Object qualifier typically results in a "Property not found" error, not Unknown member. Jon Hawkins
 
There actually is no VALUE property for the Date Picker control. You must instead reference the DAY, MONTH, and YEAR properties individually.

Be aware that this can also cause problems when you try to set the date to something, as you must set each property one at a time as well. For example, if you try to set the date to 6/30/2001, you might get an error depending on whether you set the month or day first. If you try to set the day first, and the control's current MONTH is February, you will get an Invalid Date error (date cannot be 2/30/2001). If you try to set the month first, and the control's current date is the 31st, you will also get an Invalid Date error (date cannot be 6/31/2001). What I always do to work around this is set the Day to 1, then set the Month, the Day, and the Year.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top