I have an update function in the OnClick event of a control called Torderid.I want to make
a global funnction to be executed from every form which has a control TOrderid.In
other words i want to use this update function in many forms which have a control
called TOrderID.
The following code is executed in the OnClick event of the control TOrderID :
CurrentDb.Execute “UPDATE orders INNER JOIN (products INNER JOIN [order details] ON
(products.Productid = [order details].ProductID) AND (products.Productid = [order
details].ProductID)) ON orders.orderid = [order details].OrderID SET products.stock =
products.stock+[order details].cartons WHERE orders.orderid = ” & Me!TOrderid & “;”
End Function
I want to make a public function called fnctUpdate and i want to put the control TOrderID
in the brackets, but how cani replace the Me in the global function?