I have a script that runs perfectly from a button but it does not execute from the toolbar.
It is supposed to export records not posted to the server to a "Not_Posted" Table.
Inserting a "Wait for Idle" does not help
There is no problem with the second part when the user selects "No"
The code:
I would appreciate any help on the above
Thanks
Peter G
It is supposed to export records not posted to the server to a "Not_Posted" Table.
Inserting a "Wait for Idle" does not help
There is no problem with the second part when the user selects "No"
The code:
Code:
'Displays a message box (style:'Yes, No Buttons', image: 'Information symbol', id: 'vSelected').DIM SHARED vSelected_result as N DIM SHARED vSelected_YES_Button as L DIM SHARED vSelected_NO_Button as L vSelected_YES_Button = .F. vSelected_NO_Button = .F. title_var = "Quit Bookings" message_text_var = <<%text% Are you sure that you want to quit %text% vSelected_result=ui_msg_box(title_var,message_text_var,UI_YES_NO+ UI_FIRST_BUTTON_DEFAULT+ UI_INFORMATION_SYMBOL) 'Test to see which button on the message box was pressed.... SELECT CASE vSelected_result = UI_YES_SELECTED vSelected_YES_Button= .t. script_play_local("Export_Not_Posted") 'script_play_local("Rebuild_Indexes") 'Pause the script for a instant until the user interface has finished repainting. 'xbasic_wait_for_idle(3) 'Exit Alpha Five. :a5.close() CASE vSelected_result = UI_NO_SELECTED vSelected_NO_Button= .t. if vRole = "Administrator" then script_play_local("Frm_Bookings_Master") 'Default comment text. DIM records_found as N end if if vRole = "Bookings" then script_play_local("Frm_Bookings") 'Default comment text. DIM records_found as N end if if vRole = "Developer" then script_play_local("Frm_Bookings_Master") end if END SELECT
Thanks
Peter G
Comment