Create a new record from another form

R

RichieTJ

Ok, here's the outline:


I have a form called frmOrders, which has a subform (frmOrderDetails)
and another form called frmProducts.


In frmOrderDetails, when I double-click on a field called ProdDescrip
it opens frmProducts, which gives me a product list and it's prices.
When I double-click a product, automatically add the products to the
frmOrderDetails fields ProdDescrip and UnitPrice. But I can't save the
record in frmOrderDetails and move to a new one so I can add more
products.


This is the code on frmProducts


Private Sub ProductName_DblClick(Cancel As Integer)


Forms![frmOrders]![frmOrderDet­ails]![ProdDescrip] = [ProductName]
Forms![frmOrders]![frmOrderDet­ails]![UnitPrice] = [ProductPrice]
Forms!frmOrders!frmOrderDetail­s.Form.Dirty = False


I got to save the record. But how do I get to create automatically a
new record on the subform (frmOrderDetails)? 'Cause the goal is to add
automatically products to the subform by double-clicking on the
ProductName field of frmProducts.

Richie
 
Top