Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refresh() statement
Message
From
08/05/1999 16:33:19
 
 
To
06/05/1999 23:40:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00215218
Message ID:
00216446
Views:
33
Hi Erik --
Thanks for your reply.

In short, I have still not solved the problem I am having with regards to calling my child form. ** Reminder: when I click my cmd button on my parent, it fires the called form and displays the previous selection (record) a user made on the office_search form. When I close the called form and click the cmd button for a second time, it works perfect.... the correct record on my called form is displayed. Thanks to your last message, I believe I have made a little headway.

I did as you recommended and placed the code SET STEP ON in the init of my called form to determine if the value of the paramater I am passing is what I think it is. And, the result of that experiment is that the parameter I am passing is correct.

Example: If the value I am passing in my search form is 22, I found that same number under the heading VALUE in the local section of the debugger, next to the word> TRID. I tested it several times to make sure. So, I am positive I am passing the correct value/parameter.

So, assuming my code in my click() of my cmd button on my parent (office_search) is correct, the problem must be with the called form (offices).

Just to refresh your memory, the code in the click() of my cmd button on my parent form is:

with thisform.cmbjurisdiction_search
m.myofficeId = val(.list(.listindex,2))
endwith
if !empty(m.myofficeId)
do form offices with m.myofficeId
else
with thisform.cmbofficetitle_search
m.myofficeId = val(.list(.listindex,2))
do form offices with m.myofficeId
endwith
endif

__________________________________________

The code in the init() of my called form (offices) is:

lparamters tnId
select offices
set order tag nofficeid
set key to tnId

___________________________________________

** Do you think the problem is with my code in the init of my called form (offices)?

Does there need to be some type of code in the called form (offices) that CLEARS the previous selection? For some reason, the previous selection is popping up first, and then when I close the called form, it works just like it is supposed to work! crazy --

I truly do not know what the remedy is for this, which is why I thought I would write you one more note.

By the way, the data sessions are default datasessions. When I set both forms to private datasessions, the called form would not open up to the correct record, even after I closed the form and clicked on the cmd button a second time.

TIA for any more help

Jason
Previous
Reply
Map
View

Click here to load this message in the networking platform