Hello Everyone,
Is there a way to make this work?
Want to use the brute method for a embedded browse refresh, as all other methods do not work 100% of the time for my situation.
I have been playing with code, but can not seem to get it to work the way I want.
I have been trying to use something like:
DIM mode as c
mode = parentform.mode_get()
if mode = "ENTER" .or. mode = "CHANGE" then
end
end if
if mode = "view" then
'Close current form or browse window.
DIM mode as c
mode = parentform.mode_get()
'If the form is in Enter or Change mode, first save the changes before closing the form
if mode = "ENTER" .or. mode = "CHANGE" then
parentform.commit()
'Check to see if the record was successfully saved
if parentform.mode_get()"""VIEW" then
ui_msg_box("Unable to save your changes","Please correct and save, or discard your changes", UI_STOP_SYMBOL)
end
end if
end if
'Close the form
parentform.close(.f.)
'Open a Form or Browse layout, displaying all, or selected records in the layout.
DIM Shared varP_CheckerList as P
DIM layout_name as c
layout_name = "CheckerList"
varP_CheckerList = :Form.view(layout_name)
Esentially if the form(with browse1 embedded) is in the "enter" or "Change" mode, the script would stop, when the form is in the "view" mode let the form close then reopen, for the closing and them reopening of the form.
Is this possible? If so could I please get some help?
Thanks
Ed
Is there a way to make this work?
Want to use the brute method for a embedded browse refresh, as all other methods do not work 100% of the time for my situation.
I have been playing with code, but can not seem to get it to work the way I want.
I have been trying to use something like:
DIM mode as c
mode = parentform.mode_get()
if mode = "ENTER" .or. mode = "CHANGE" then
end
end if
if mode = "view" then
'Close current form or browse window.
DIM mode as c
mode = parentform.mode_get()
'If the form is in Enter or Change mode, first save the changes before closing the form
if mode = "ENTER" .or. mode = "CHANGE" then
parentform.commit()
'Check to see if the record was successfully saved
if parentform.mode_get()"""VIEW" then
ui_msg_box("Unable to save your changes","Please correct and save, or discard your changes", UI_STOP_SYMBOL)
end
end if
end if
'Close the form
parentform.close(.f.)
'Open a Form or Browse layout, displaying all, or selected records in the layout.
DIM Shared varP_CheckerList as P
DIM layout_name as c
layout_name = "CheckerList"
varP_CheckerList = :Form.view(layout_name)
Esentially if the form(with browse1 embedded) is in the "enter" or "Change" mode, the script would stop, when the form is in the "view" mode let the form close then reopen, for the closing and them reopening of the form.
Is this possible? If so could I please get some help?
Thanks
Ed
Comment