Setting value of control on separate form (None Specified)
At 31 MAR 1999 09:38:25AM Gene Sorbo wrote:
Revsoft,
This is a duplicate of a posting to the online discussion area - can you provide any insight?
Read record into form 1 (record lock occurs)
]User changes data in control 1 on form 1
]On lost focus event for control 1, stored procedure determines if the data has changed, and then displays a message asking user if an update should occur to a separate data field bound to a control on form 2 (same table as form 1)
]If user responds with Yes, use Set_Property to update the value of the control on form 2 via Set_Property("WINDOW_NAME.CONTROL", "DEFPROP", value)
I have not been able to get this to work, although if I hide the control located on form 2 on form 1, it does work.
At this point, I am wondering if this is an OI 'feature', or if my expectations are out of whack. In AREV, I would have simply updated the appropriate @RECORD elements in a post prompt process and let the actual record SAVE take care of the rest.
Thoughts?
Gene ]]
At 31 MAR 1999 09:59AM Cameron Purdy wrote:
Gene,
Set_Property("WINDOW_NAME.CONTROL", "DEFPROP", value)
If it is a multi-instance form, the window name will change per instance of the window, so you must not hard code the window name. For example, if you open three instances of the same window called MYWIN, you will probably see window ID's like:
MYWIN
MYWIN*17
MYWIN*19
I have not been able to get this to work, although if I hide the control located on form 2 on form 1, it does work.
I don't understand what you mean at all.
Cameron Purdy
Revelation Software
At 01 APR 1999 09:27AM Gene Sorbo wrote:
Cameron,
I had form 1 open, and then attempted to Set_Property on a control on form 2 which HAD NOT BEEN OPENED, but was bound to the same table as form 1.
I'm now clear on why this won't work (i.e., how does form 2 'know' that you have form 1 already open with a particular record id, etc, etc…).
I'm going to implement a tabbed form design to resolve this at some later date - for now, I'll hide the form 2 control on form 1 for update purposes.
Thanks for your quick response.
Gene
I guess I'm still trying to resolve the differences with the way AREV handled @RECORD, and the way OI handles updates to the database.