I have no idea what the title should be....
Have been working on this problem (off and on) for about 3 days and going brain dead because I cannot find the solution.
Here's the 'scenario':
From a Main Menu - Choose 'transaction' form and open it - the form record order is recno() and edits are disallowed from OnInit event
From the transaction form - press new record button - this runs a script
Script:
Progressive Lookup for customer name - calls a modal form and displays customer data - customer is OK'd (other choices - wrong cus, repeat lookup - cancel new rec - return to transaction form)
Script fills two vars (vc_cusid1 and vc_cus_lastname) from customer table data.
Script allows edits and calls new record.
2 form fields (tx_cus_id and tx_cus_lastname) are filled from the vars
HERE the problem starts....
when the script ends, the transaction form is displayed with the two fields properly filled, but nothing done so far activates the first tabstop field (tx date) and allows further data entry. Not even F3...
At this point, and that may change, I do not wish to change the no-edits when the form is called, and I really don't want to make another identical form just for data entry.
In the above code, could not get change to begin - both parentform and :transactions could not be found
In above code, transaction form could not be found for the refresh or the activate commands, either together or individually. script errored out and changes could not be made -- again not even with F3
I really hope this is clear enough --
Thanx for any help
D
Have been working on this problem (off and on) for about 3 days and going brain dead because I cannot find the solution.
Here's the 'scenario':
From a Main Menu - Choose 'transaction' form and open it - the form record order is recno() and edits are disallowed from OnInit event
From the transaction form - press new record button - this runs a script
Script:
Progressive Lookup for customer name - calls a modal form and displays customer data - customer is OK'd (other choices - wrong cus, repeat lookup - cancel new rec - return to transaction form)
Script fills two vars (vc_cusid1 and vc_cus_lastname) from customer table data.
Script allows edits and calls new record.
2 form fields (tx_cus_id and tx_cus_lastname) are filled from the vars
HERE the problem starts....
when the script ends, the transaction form is displayed with the two fields properly filled, but nothing done so far activates the first tabstop field (tx date) and allows further data entry. Not even F3...
At this point, and that may change, I do not wish to change the no-edits when the form is called, and I really don't want to make another identical form just for data entry.
Code:
''open tbl, put in cus data, close tbl, make chngs 'dim ttx as P 'dim vn_lastrec as N ' 'ttx=table.open("dd_transactions") 'ttx.enter_begin() 'ttx.Tx_cus_id=vc_cusid1 'ttx.Tx_cus_lastname=vc_cus_lastname 'ttx.enter_end() 'vn_lastrec=ttx.records_get() ''ttx.close() 'this line was not used 'parentform.Recno_goto(vn_lastrec) 'this works to here but next 2 lines -- each individually - cause error ''parentform.change_begin() '':transactions.change_begin()
Code:
object_name = ":transactions" :transactions.allow_change(.t.) :transactions.new_record() :transactions:tx_cus_id.value=vc_cusid1 ':transactions:tx_Cus_lastname.value="" :transactions:tx_Cus_lastname.value=vc_cus_lastname ':transactions.refresh() ':transactions:tx_appt_date.Activate()
I really hope this is clear enough --
Thanx for any help
D
Comment