M
Moe
I am new to VBA and need to call "OrdersForm" from the "CustomersForm" It
should open in to a new order with customer info from "CustomersFrom" filled
in. I tried the following code in the "on Click" property of the calling
button in the CustomersForm. It opens the ordersForm in to new order (blank
with a new orderID) but the Cusotmer info which was open on the
"customersForm" does not come up in the order:
stLinkCriteria = "[CustomerID]=" & Me![CustomerID]
DoCmd.OpenForm "ordersForm"
RunCommand acCmdRecordsGoToNew
DoCmd.GoToControl "CustomerID" (a combobox displaying Customer name)
Docmd.FindRecord stLinkCriteria
Any idea?
should open in to a new order with customer info from "CustomersFrom" filled
in. I tried the following code in the "on Click" property of the calling
button in the CustomersForm. It opens the ordersForm in to new order (blank
with a new orderID) but the Cusotmer info which was open on the
"customersForm" does not come up in the order:
stLinkCriteria = "[CustomerID]=" & Me![CustomerID]
DoCmd.OpenForm "ordersForm"
RunCommand acCmdRecordsGoToNew
DoCmd.GoToControl "CustomerID" (a combobox displaying Customer name)
Docmd.FindRecord stLinkCriteria
Any idea?