The following xbasic program runs in version 5 OK, but when I upgraded to version 7 I get the following error message;
Trapper error in action command: [1]
Command: Inline Xbasic
Error: Function not recognized
I have to click "Ignore" 3 times to clear the error then I get a "blank" window "Which pay date?" without any date appearing, all "transdate's" should appear.
the following is the program;
Would appreciate any help, I'm stumped....
Thanks
Don
Trapper error in action command: [1]
Command: Inline Xbasic
Error: Function not recognized
I have to click "Ignore" 3 times to clear the error then I get a "blank" window "Which pay date?" without any date appearing, all "transdate's" should appear.
the following is the program;
Code:
'Date Created: 19-Jan-2005 03:28:45 PM 'Last Updated: 01-Feb-2006 11:08:47 AM 'Created By : 'Updated By : AGO ''**** Version 1.0 ''**** Any changes may make this script unreadable by Alpha Five. DIM ax_choice as C DIM ax_response as N DIM ax_dialog as P ON ERROR GOTO ax_error_trap DIM ax_error_trap_desc as C DIM ax_error_trap_offset as C DIM ax_error_trap_msg as C DIM ax_error_trap_response as N 'AX~Action Command~1~ 'AX~PX9~.T.~ 'AX~PX10~~ 'AX~PX56~0~ 'AX~PX55~0~ ax_error_trap_desc = "Action Script" ax_error_trap_offset = "0" 'AX~Action Command~4~ 'AX~PX4~dim global vdate as c\AN\AKdim namearray(52) as C \AN\AKdim i as n \AN\AK\AN\AKi=1 \AN\AKtbl=table.open("time_HX",file_ro_shared) 'open the payroll file\AN\AKtbl.index_primary_put("trandate") 'look at this index, its unique\AN\AKtbl.fetch_first() \AN\AKwhile .not.tbl.fetch_EOF() \AN\AKnamearray(i)=dtoc(tbl.trandate) 'change the date to character\AN\AKi=i+1 \AN\AKtbl.fetch_next() \AN\AKend while \AN\AKtbl.close() \AN\AKvdate=ui_get_list_array("Which Pay Date?",1,"namearray") \AN\AKvdate=alltrim(vdate) \AN\AKif vdate="" \AN\AKend \AN\AKend if \AN\AK\AN\AKdim A_ASK_PRINT as c\AN\AKA_ASK_PRINT = ui_get_radio(this.text, 1, "Print", "Preview")\AN\AKif A_ASK_PRINT = "Print"\AN\AK\AJgoto print\AN\AKelseif A_ASK_PRINT = "Preview"\AN\AK\AJgoto preview\AN\AKelse\AN\AK\AJgoto cleanup\AN\AKend if\AN\AKprint:\AN\AK:Report.print("Time Summary")\AN\AKgoto cleanup\AN\AKpreview:\AN\AK:Report.preview("Time Summary")\AN\AKgoto cleanup\AN\AKcleanup:\AN\AKend\AN\AK\AN\AKparentform.close()\AN\AKEnd\AN\AK~ 'AX~PX56~0~ 'AX~PX55~~ ax_error_trap_desc = "Inline Xbasic" ax_error_trap_offset = "1" dim global vdate as c dim namearray(52) as C dim i as n i=1 tbl=table.open("time_HX",file_ro_shared) 'open the payroll file tbl.index_primary_put("Trandate") 'look at this index, its unique tbl.fetch_first() while .not.tbl.fetch_EOF() namearray(i)=dtoc(tbl.trandate) 'change the date to character i=i+1 tbl.fetch_next() end while tbl.close() vdate=ui_get_list_array("Which Pay Date?",1,"namearray") vdate=alltrim(vdate) if vdate="" end end if dim A_ASK_PRINT as c A_ASK_PRINT = ui_get_radio(this.text, 1, "Print", "Preview") if A_ASK_PRINT = "Print" goto print elseif A_ASK_PRINT = "Preview" goto preview else goto cleanup end if print: :Report.print("Time Summary") goto cleanup preview: :Report.preview("Time Summary") goto cleanup cleanup: end parentform.close() End END ax_error_trap: ax_error_trap_msg = "Trapped error in action command: [" + ax_error_trap_offset + "] " + chr(13) + chr(13) + "Command: " + ax_error_trap_desc + chr(13) + "Error: " + error_text_get() ax_error_trap_response = ui_msg_box("Action Program Error", ax_error_trap_msg, 2) IF ax_error_trap_response = 4 THEN ''Retry RESUME 0 ELSEIF ax_error_trap_response = 5 THEN ''Ignore RESUME NEXT ELSE ''Abort END END IF ''**** ''**** End
Thanks
Don
Comment