I want to create a table which I am going to email for reporting purposes.
I can get what I need in the code for one item but I need to use a dialog to choice this. I am still trying to get up to speed and I need to pass from the dialog to the aftervalidate code what the users chooses. Here is what I have but am not getting it right any help would be great thanks.
CODE **************** ON AFTERVALIDATE ON DIALOG SO USER CAN ENTER WHICH PARCODE THEY WANT **********
copy_db_name = filename_decode("excelreport.dbf")
a_tbl = table.open("arcusfilreports")
DIM a5_operation_order as C
a5_operation_order = "PAR_CUS_NO"
query.order = a5_operation_order
DIM a5_operation_filter as C
'a5_operation_filter = "Par_cus_no = \"940\"" THIS WORKS WITH THE CODE BUT HAVE TO PASS FROM DIALOG THE NUMBER!
a5_operation_filter = "Par_cus_no = CurrentForm.Controls.parentnumber"
query.filter = a5_operation_filter
query.options = "I"
query.description = "Temporary Query"
i_indx = a_tbl.query_create()
copy.set = ""
copy.db = copy_db_name
copy.dd = .F.
copy.delete_o_dd = .T.
copy.records = .T.
copy.fields = 9
copy.field1 = "Par_Cus_No"
copy.field2 = "Cus_No"
copy.field3 = "Last_Stm_Age_Dt"
copy.field4 = "Amt_Age_Prd_1"
copy.field5 = "Amt_Age_Prd_2"
copy.field6 = "Amt_Age_Prd_3"
copy.field7 = "Amt_Age_Prd_4"
copy.field8 = "Balance"
copy.field9 = "Note_5"
a_tbl.copy()
a_tbl.close()
end
*****************************************************
Any clarity on this would be great.
Thanks in advance.
Nicholas Wieland
I can get what I need in the code for one item but I need to use a dialog to choice this. I am still trying to get up to speed and I need to pass from the dialog to the aftervalidate code what the users chooses. Here is what I have but am not getting it right any help would be great thanks.
CODE **************** ON AFTERVALIDATE ON DIALOG SO USER CAN ENTER WHICH PARCODE THEY WANT **********
copy_db_name = filename_decode("excelreport.dbf")
a_tbl = table.open("arcusfilreports")
DIM a5_operation_order as C
a5_operation_order = "PAR_CUS_NO"
query.order = a5_operation_order
DIM a5_operation_filter as C
'a5_operation_filter = "Par_cus_no = \"940\"" THIS WORKS WITH THE CODE BUT HAVE TO PASS FROM DIALOG THE NUMBER!
a5_operation_filter = "Par_cus_no = CurrentForm.Controls.parentnumber"
query.filter = a5_operation_filter
query.options = "I"
query.description = "Temporary Query"
i_indx = a_tbl.query_create()
copy.set = ""
copy.db = copy_db_name
copy.dd = .F.
copy.delete_o_dd = .T.
copy.records = .T.
copy.fields = 9
copy.field1 = "Par_Cus_No"
copy.field2 = "Cus_No"
copy.field3 = "Last_Stm_Age_Dt"
copy.field4 = "Amt_Age_Prd_1"
copy.field5 = "Amt_Age_Prd_2"
copy.field6 = "Amt_Age_Prd_3"
copy.field7 = "Amt_Age_Prd_4"
copy.field8 = "Balance"
copy.field9 = "Note_5"
a_tbl.copy()
a_tbl.close()
end
*****************************************************
Any clarity on this would be great.
Thanks in advance.
Nicholas Wieland
Comment