Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Application Framework DoForm
Message
 
 
To
22/09/2005 12:43:05
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01051754
Message ID:
01052057
Views:
12
>You can either modify the doform method to accept an additional parameter and modify your doform() call to send values for the other parameters as well or create a 2nd method such as doformp() and copy and paste the code from doform into and modify it and call it instead. I gave an example below of modifying the doform method to accept a parameter to pass to the form. However, in your case, since you want to pass a parameter, if the form already is open you don't want to show it like the code does below but rather close it and reopen it passing the parameter so you should create a new method like doformp() to call instead and modify it meet your needs.
>
>Such as:
>
>
>*Example calling doform method
>oApp.doform('myform',.f.,.f.,.f.,.f.,.f.,'my new value')
>
Here is the modified piece to be precise:
IF !EMPTY(tcCharParam)
      DO FORM (lcFileName) NAME THIS.aForms[THIS.nFormCount] LINKED NOSHOW WITH &tcCharParam
   ELSE
      DO FORM (lcFileName) NAME THIS.aForms[THIS.nFormCount] LINKED NOSHOW
   ENDIF
and the call would be oApp.doform('myform',.f.,.f.,.f.,.f.,.f.,['my new value',0,.t.,{2000-05-05}]), e.g. all parameters would be passed as string. I have a method ValToStr to convert any passed value to its character representation.

Sorry, just realised you used only one character parameter. Using macro we can pass multiple parameters.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform