Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Control Methods not copying over to new form
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Control Methods not copying over to new form
Miscellaneous
Thread ID:
00518648
Message ID:
00518648
Views:
52
Hello,

I have a form that I created in which the controls have some minor methods behind them. For instance in the forms Init() method I have the following code:

ThisForm.dRptDate.DateTextbox.value = Date() + (7-Dow(Date()))

The form accurately displays next Saturdays' date when the form initializes. I then created a second form, copied the date textbox from the first form, pasted it to the second form, and copied the code above into the new forms' Init() method. The new form's date textbox does not pull up any date when the form initializes.

I have had a similar problem with the cancel button. Here is the code behind the click method:

lCancelReport = .T.
ThisForm.Release()

This closes the first form, but does nothing with the second.

I have mirrored the the attributes of both the forms and the controls, but the second form still does not work.

Does VFP not allow you to copy controls from one form to another when THISFORM.xxx is used in the code?

Any help would be greatly appreciated!
Next
Reply
Map
View

Click here to load this message in the networking platform