I have a Main Form "SalesOrders" and a Subform "SalesOrdersSubform" - the subform is linked to the main form by "SalesID" no.
I have a third form "PrevPurchases" which list the products that the customer has purchased in the past and is filtered from the Main form by the "ClientName"
In the Past Purchases form i have it that if they DoubleClick the name of a product hat they have purchased in the past then it Makes an entry in the "SalesOrderSubform" and then I try to move the cursor tyo it but cant. It makes the entry, I then change focus and then the New Entry product name is hilited but the Cursor is stays on the product name that was doubleclicked - I cant seem to get the cursor to go to the place that has the set focus
Code is as follows
>>>>>>>>
Private Sub description_DblClick(Cancel As Integer)
Dim StockCode As String
Dim OrdNo As Integer
OrdNo = [Forms]![SalesOrders]!SalesID
StockCode = stock_id
Call OrderAdd(StockCode, OrdNo)
[Forms]![SalesOrders]![SalesOrdersSubform].SetFocus
DoCmd.Requery
DoCmd.GoToRecord , , acLast
Forms!SalesOrders!SalesOrdersSubform.Form!Product.SetFocus
End Sub
>>>>>>>>>>
The only way to move the cursor is to place the mouse over the new product and click - Problem is some staff just press the "Enter" key and that takes them to the next record in the PrevPurchases list
I have a third form "PrevPurchases" which list the products that the customer has purchased in the past and is filtered from the Main form by the "ClientName"
In the Past Purchases form i have it that if they DoubleClick the name of a product hat they have purchased in the past then it Makes an entry in the "SalesOrderSubform" and then I try to move the cursor tyo it but cant. It makes the entry, I then change focus and then the New Entry product name is hilited but the Cursor is stays on the product name that was doubleclicked - I cant seem to get the cursor to go to the place that has the set focus
Code is as follows
>>>>>>>>
Private Sub description_DblClick(Cancel As Integer)
Dim StockCode As String
Dim OrdNo As Integer
OrdNo = [Forms]![SalesOrders]!SalesID
StockCode = stock_id
Call OrderAdd(StockCode, OrdNo)
[Forms]![SalesOrders]![SalesOrdersSubform].SetFocus
DoCmd.Requery
DoCmd.GoToRecord , , acLast
Forms!SalesOrders!SalesOrdersSubform.Form!Product.SetFocus
End Sub
>>>>>>>>>>
The only way to move the cursor is to place the mouse over the new product and click - Problem is some staff just press the "Enter" key and that takes them to the next record in the PrevPurchases list