Sorry, I forgot the paragraph tags in the HTML.
I created a button on a form to terminate an employee. I followed the steps in the Introduction to Action Scripting manual and everything works as it should.
When I copy the XBasic copy and paste in into an icon on the custom toolbar that will go with the form. the code doesn't work properly! When I click the icon the three-choice dialog box appears. 'Cancel' works, 'No' works partically (the Note dialog box does not appear), and the Status is not changed, which is correct. The 'Yes' button does not work at all! Here is the code for anyone who want to take a hack at it.
I've gone over it and over it, and I cannot find what is wrong.
[code]
'Displays a message box (style:'Yes, No, Cancel Buttons', image: 'Question symbol', id: 'terminate').
DIM SHARED terminate_result as N
DIM SHARED terminate_YES_Button as L
DIM SHARED terminate_NO_Button as L
DIM SHARED terminate_CANCEL_Button as L
terminate_YES_Button = .F.
terminate_NO_Button = .F.
terminate_CANCEL_Button = .F.
title_var = "Terminate employee"
message_text_var = terminate_NO_Button=.t.") THEN
'Displays a message box (style:'OK Button', image: 'Information symbol', id: 'notterminated').
DIM SHARED notterminated_result as N
DIM SHARED notterminated_OK_Button as L
notterminated_OK_Button = .F.
title_var = "Note"
message_text_var = I'm just starting to get into the new Action Scripting, and I would really like to know what I did wrong.
Thanks
Dave
I created a button on a form to terminate an employee. I followed the steps in the Introduction to Action Scripting manual and everything works as it should.
When I copy the XBasic copy and paste in into an icon on the custom toolbar that will go with the form. the code doesn't work properly! When I click the icon the three-choice dialog box appears. 'Cancel' works, 'No' works partically (the Note dialog box does not appear), and the Status is not changed, which is correct. The 'Yes' button does not work at all! Here is the code for anyone who want to take a hack at it.
I've gone over it and over it, and I cannot find what is wrong.
[code]
'Displays a message box (style:'Yes, No, Cancel Buttons', image: 'Question symbol', id: 'terminate').
DIM SHARED terminate_result as N
DIM SHARED terminate_YES_Button as L
DIM SHARED terminate_NO_Button as L
DIM SHARED terminate_CANCEL_Button as L
terminate_YES_Button = .F.
terminate_NO_Button = .F.
terminate_CANCEL_Button = .F.
title_var = "Terminate employee"
message_text_var = terminate_NO_Button=.t.") THEN
'Displays a message box (style:'OK Button', image: 'Information symbol', id: 'notterminated').
DIM SHARED notterminated_result as N
DIM SHARED notterminated_OK_Button as L
notterminated_OK_Button = .F.
title_var = "Note"
message_text_var = I'm just starting to get into the new Action Scripting, and I would really like to know what I did wrong.
Thanks
Dave
Comment