I am trying to pass a value with the dialog_box function to launch a form and automatically read the value into the newly launched form.
i.e
value=.controlname on calling form"x=Dialog_Box("newformname", Parent, value)the new form launch's (create) fine, but the value does not get passed and no read gets processed. I have had success with this
if the value is single value on the form but should that make a difference?
B Cameron,
When you say that it works fine when it is a single valuedoes that mean it is not working fine when passing multiple values? The reason I ask this is because you can not pass variables that are delaminated with @rm. This is something that you could check.
DaveRevelation
Actually it works both ways now.
The answer came from Mike Ruane of WinWinSolutions.
"He da man" whereby he informed me that he had already
informed me (the other day but I duh…) that I had to add
if CreateParam then
.value-]TEXT=CreateParamcall Send_Event(@window,"READ")end
return 1
to the create event of the called window from the dialog_box function. So thanks to all. Hi dee ho
Actually it works both ways now.
The answer came from Mike Ruane of WinWinSolutions.
"He da man" whereby he informed me that he had already
informed me (the other day but I duh…) that I had to add
if CreateParam then
.value-]TEXT=CreateParamcall Send_Event(@window,"READ")end
return 1
to the create event of the called window from the dialog_box function. So thanks to all. Hi dee ho
B Cameron
This is the way I do these calls:
Value=something
return_value=Dialog_Box(MyWindowName , @window , value)
Now in MyWindowName, the CREATE event has code that takes the CreateParam (which should be what you passed in through Value), identifies what needs to be put in the key field, and then triggers a
send_Event(@window , "READ").
Instead of send_event(…"READ") you could also set the QBFLIST property of the window with the list of keys you passed in. That triggers the display of data automatically (but DOES NOT use the READ event).
I guarantee you that if you follow these instructions, Dialog_Box will work like a charm!