I have 3 forms.
Transaction----based on trans table
tapAdd_Trans--based on the set trans_alloc_prod (trans=>allocation_tbl,-> prod tables)...one=>many and one->one
tSel_Vendor----based on client_info table
From the Transaction form the Insert button is pushed which brings up both of the other forms---tapAdd_Trans form first and then tSel_Vendor second (in Modal dialog). The tSel_Vendor form is where a company is chosen for a transaction and is placed into the tapAdd_Trans form. So simply, the Transaction form is used to see a general view of transactions. The tapAdd_Trans form shows the details of each transaction. The tSel_Vendor is just a form in which to pick a company that the transaction occurred at.
Everything works properly except for the following: When the tSel_Vendor
form is brought up and then cancelled, I want to have the tapAdd_Trans form to close at the same time....and cancel any changes so a blank record isn't saved.
If I close the tapAdd_Trans form from the "Cancel" button of the tSel_Vendor form I get errors due to the script running from the "Insert" button pressed on the Transaction form that first opened the tSel_Vendor form as a Modal dialog.
I have been attempting to add a script to the Transaction form's Insert button (after the script that opens the tSel_Vendor form) that would cancel changes and close the tapAdd_Trans form if its Company field is blank. As the variable seems to retain its prior value I have set the variable value to "" when the cancel button is pushed. The simplist way I would think would be to have the script "button6.push()" which is the Cancel button of the tapAdd_Trans form. And would not mind even this work-a-round but cannot even get this to work! I cannot get the script to cancel changes or to close the form tapAdd_Trans and have tried various ways using pointers, actual paths, parentform, topparent, etc but obviously have them incorrect as any one of the methods I have attempted should work. I must be missing something very basic which would not surprise me in the least.
I have attached a sample database for those who think they may be able to help. The easiest way for navigating is just to choose the aMENU form and it shows the way.
Mike
Transaction----based on trans table
tapAdd_Trans--based on the set trans_alloc_prod (trans=>allocation_tbl,-> prod tables)...one=>many and one->one
tSel_Vendor----based on client_info table
From the Transaction form the Insert button is pushed which brings up both of the other forms---tapAdd_Trans form first and then tSel_Vendor second (in Modal dialog). The tSel_Vendor form is where a company is chosen for a transaction and is placed into the tapAdd_Trans form. So simply, the Transaction form is used to see a general view of transactions. The tapAdd_Trans form shows the details of each transaction. The tSel_Vendor is just a form in which to pick a company that the transaction occurred at.
Everything works properly except for the following: When the tSel_Vendor
form is brought up and then cancelled, I want to have the tapAdd_Trans form to close at the same time....and cancel any changes so a blank record isn't saved.
If I close the tapAdd_Trans form from the "Cancel" button of the tSel_Vendor form I get errors due to the script running from the "Insert" button pressed on the Transaction form that first opened the tSel_Vendor form as a Modal dialog.
I have been attempting to add a script to the Transaction form's Insert button (after the script that opens the tSel_Vendor form) that would cancel changes and close the tapAdd_Trans form if its Company field is blank. As the variable seems to retain its prior value I have set the variable value to "" when the cancel button is pushed. The simplist way I would think would be to have the script "button6.push()" which is the Cancel button of the tapAdd_Trans form. And would not mind even this work-a-round but cannot even get this to work! I cannot get the script to cancel changes or to close the form tapAdd_Trans and have tried various ways using pointers, actual paths, parentform, topparent, etc but obviously have them incorrect as any one of the methods I have attempted should work. I must be missing something very basic which would not surprise me in the least.
I have attached a sample database for those who think they may be able to help. The easiest way for navigating is just to choose the aMENU form and it shows the way.
Mike
Comment