I've created a multiform project in which records can be added to a listbox by calling a second form to enter the required data.I managed to get the data back from the called form.Now I would need to add editing capabilities to this by populating the controls (simple textboxes) of the called form with values from the listbox, so that the user can edit them.But the variables that i use to get the data back, seem not to have any effect in the reverse.Here's an excerpt of the test-call:$AccountForm_textboxAccountUsername="Some Text"if((Call-AccountForm_pff) -eq "OK"){ Write-Host $AccountForm_textboxAccountUsername}
druf@up-great.ch2012-06-19 11:11:54
multiform passing data to called form
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- mysapien@upgreat.ch
- Posts: 5
- Last visit: Fri Jan 26, 2024 3:09 am
multiform passing data to called form
Those variables only return the result when a sub form is called and can't be used to initialize. If you need to pass parameters add a parameter block to the top of the subform's editor: param ([string]$textvalue) Then initialize the textbox in the Form's load event block. Next you update the subform call as follows: if((Call-AccountForm_pff -textvalue "Some text") -eq "OK"){...}
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- mysapien@upgreat.ch
- Posts: 5
- Last visit: Fri Jan 26, 2024 3:09 am
multiform passing data to called form
Many thanks.That was exactly what I was looking for.Are there any good sample projects, which show all this concepts of a multiform-project
multiform passing data to called form
It's on my TODO list There are some projects on the blog but they don't use parameter passing between forms. David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.