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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

olecontrol calendar problems

Status
Not open for further replies.

tazardous

Programmer
Aug 22, 2002
58
US
I created a form with two olecontrol calendar fields and it works fine with I run the form, clicking on the field allows the user to type in a date, clicking on the down arrow allows the user to pick from a calendar.

But with I create a button to launch this form from another form, the calendar controls don't function.

Any ideas?

Thanks,
Taz
 
tazardous,

A few questions...what control are you using? I am assuming it is the DATETIME picker control??? Also, when you say "the calendar controls don't function", are you saying that it throws an error, or that the calendars don't drop down, that the controls are blank and inaccessible, or what? There is just too little information for me at this point, if you could expand on your problem it might ring some bells with me or someone else. Sorry I wasn't of more help at the moment. More questions than answers it would seem for now.

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Hi,
No error. The form loads and displays fine, the control, which normally displays as a date field with a drop down arrow on the right, displays normally. It just isn't active or usable. Normally,since it's the first field (tabindex of 1), the month portion of the date is highlighted and I am able either to type over the current date or click on the down arrow (at which time a calendar pops up).

(Again, the form, when 'run' from the command window, works fine. It's only when I call the form from a click event on a button from my main form, that the controls fail to work.)

Here are the properties of the control under the 'Other' tab. Hope this helps.

thanks!!

baseclass: Olecontrol
Class: Olecontrol
DragMode: 0 - Manual (Default)
Enabled: .T. - True (Default)
Name: OlecontrolFIS1
OleClass: MSConCtl2.DTPicker.2
OleCID: 1033
Parent: 0
ParentClass: None
TabIndex: 1
TabStop: .T. - True(Default)
 
Note: Although I have other button on my main form, and they appear to launch secondary forms that function fine, I have noticed that the reason this form is not functioning when launched from the main form is because the main form has a READ that is interfering with the secondary form. If I clear the read (close the main form) the secondary form with the calendar controls begins behaving normally.

Taz
 

Since VFP3.0 there is no more need for READ.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks.... OF course this particular project is a converted macintosh foxpro 2.6 project and there are a lot of chunks of code that the converter hasn't choose to handle in it's 'own' way. Including spr that have hard coded screen formatting and reads.

I have decided to simply clear the read and close the calling form for this particular case.
Thanks to all for your help.
taz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top