Ok,
just so we can get the common terms straight so we are both talking about the same thing, do you mean;
How do you get a form (ie. purchase_form) to update a table (ie. stock_table) in the database (ie. Inventory DB) whilst also inserting a record into another table (ie. sales_table) when the forms ok button is pressed ?.
or
How do you get a form (ie. purchase_form) to update a table (ie. stock_table) in a database (ie. Inventory DB) whilst also inserting a record into another table (ie. sales_table) in another database (ie. sales_db) when the forms ok button is pressed ?.
For the first one then;
'cmdo.runsql $sql'
with $sql having the value of something like
$sql = 'update stock_table set quantity = quantity -1 where stock_code = " & me.stock_item_cbx.Column(0)
this is assuming that the update is being kicked off from the purchase form so the me.[control name] should work and the stock_item_cbx is a combobox which has two columns, 0 containing the stock_code and hidden and 1 containing the stock item name which the user / sales person can select.
For the second one I would start looking at ADO or DAO to open two seperate databases at the same time.
RB