Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to mimic Read Events?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00152384
Message ID:
00152428
Views:
21
>>>I asked a question yesterday about having nested Read Events to which I found out you can't do and it was suggested that I use a modal form. This really doesn't solve my problem.
>>>
>>>Basically whats happening is a class' method (preparedata) is called from within the class' init. In the preparedata method I check to see if whether or not I need to make the form visible to accept some selection criteria. What I want to happen is if I determine I need to accept selection criteria I would like for the code execution to stop at this point and then allow the customer to fill in textboxes etc and then click a button that will then allow the program execution to continue from where it stopped within the preparedata method.
>>>
>>>Is there a way to handle this scenario?
>>>
>>>Thanks
>>
>>You can still do it in Init event, and not necessarily to bring up 'Search' modal form. It can be modeless, but first form itself should return .F. When 'Search' form will finsih its work, the first form can be brought up again automatically.
>
>I take it what you are saying is the only way to do this is to call another form for the user to input the selection criteria. I can't have the selection criteria textboxes etc on the first form and just make it visible and stop the execution of the current method until the user fills in the textboxes etc.?

Actually, it's more about design approach. My 'Search' form usually includes few buttons (instead of one) to finish the search: they may call 'Data Entry Screen', 'List Screen', 'Specific View Screen' etc (these are just examples), so user can make decision where s/he actually wants to go with the search results. So, how can this be applied to your situation:
***DataEntry Form Init event (actually I prefer Activate event)
IF....  && check that additional search is needed
 oApp.oCommonForms.StartForm("frmSearch")
 Return .F.
ELSE
 *** normal case
ENDIF
*** frmSearch.cmdGotoDataEntry.click event
oApp.oEditForms.StartForm("frmDataEntry")
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform