Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing variables
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00021081
Message ID:
00021227
Views:
42
>>>>how do you pass variables between 2 different forms. The problem I am having is that I have 2 form each with a private data session. I want to assign the current record number to a variable and pass that to the other form. any suggestions. thanks fot the help.
>>>
>>>The line of code that calls the second form should look like this
>>>
>>>'Do Form Form2 WITH VARIBLE'
>>>
>>>Replace 'VARIBLE' with either RecNo() or the ID of the record you want to pass
>>>
>>>In the INIT Event of the second form the first line should look like this
>>>
>>>Parameters VaribleName
>>>
>>>You can then either use a seek/select query or go commands to find the record
>>>
>>>Hope this helps
>>
>>In additition to Steve's information, you need to know that the variable is only visible in the INIT event. If you need it anywhere else, you will have to put into a form property or you will have to turn it into a public variable.
>>
>>Sure would be nice to have form-scoped variables!
>What is a form-scoped variable if not a property. Nomenclature is a real stumbling block.

You're right - they ARE equivalent in RESULTS. My problem isn't with the form properties as much as it is with the method of adding them. You can't go back and edit the variable, just the description. And I ALWAYS forget at least one of the () on an array variable.
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform