Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How does this work?
Message
From
31/01/2000 14:41:17
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00325209
Message ID:
00325221
Views:
18
Hi Steve,

Calling a modal from a modal? Tsk tsk.
OK, how about the following scenario. Call the lookup for with DO FORM blahblah WITH var TO var2. If var2 is a key, you found your record and show it. If they answered "No" in the lookup, return "" (blank). If they answered "Yes" to a new record, then return "NEW" or whatever and trap that in the original form. So the code in the original form is kinda like:

DO FORM lookup WITH cOutVal TO cInVal
IF cInVal = "NEW"
DO FORM newrepairshop
ENDIF
ThisForm.Refresh() && Show the right record.

>I run a data entry form which contains automobile information about a certain person's automobile and can call a lookup form (WindowType = modal) to find a repair shop record in a repair shop database. If I find a record, I release the lookup form and display the repair shop record in my automobile data entry form. No prob.
>
>Here's where it gets messy and this is my question -
>If I don't find a repair shop record, I ask if the user wants to create a new repair shop record? Y or N. If N, I return to the data entry form without changes.
>
>If Y (user wants to create a new repair shop record) then I call a repair shop data entry form and the user creates a new repair shop record). But when I exit the repair shop data entry form, I want to return a value to the automobile data entry form like I do when I come from the repair shop lookup form.
>
>So what I am trying to do is set the WindowType = 1 (modal) before the repair shop data entry form loads, but it doesn't seem to work in the Init of the form. But I have to have it after my Parameter statement because I passed a parameter telling the repair shop data entry form that I am adding a repair shop.
>
>I release the repair shop lookup form if the users says Y they want to create a new repair shop record. But can I return a value to the automobile data entry form from the repair shop form because the automobile data entry form called the repair shop lookup for with the command DO FORM lookup.scx WITH nRetValue, but I have already released that form.
>
>I am not sure how to handle this calling of a form followed by calling of another form, and releasing the second form, but returning a value to the original form from the last form.
>
>Any way to do this so it makes sense? Thanks for helping.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform