DblClickNotInList

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DD

    DblClickNotInList

    Hi
    For those who have not heard of my problem!
    (Error on DblClick)
    the following code 'i now know' works fantastic in a Combobox , you
    can DblClick to open the frmCustomer add a new customer and then close
    frmCustomer dropdown the combobox in frmOrders and the new customer is
    in.


    However i have found this code only works if the frmOrders is bound to
    tblOrder not qryOrder..i need it to work when bound to qryOrder,, this
    was the cause of My original Problem.
    Can anyone suggest;

    Dim lngCustomerID As Long

    If IsNull(Me![CustomerID]) Then
    Me![CustomerID].Text = ""
    Else
    lngCustomerID = Me![CustomerID]
    Me![CustomerID] = Null
    End If
    DoCmd.OpenForm "frmCustome r", , , , , acDialog, "GotoNew"
    Me![CustomerID].Requery
    If lngCustomerID <> 0 Then Me![CustomerID] = lngCustomerID

    Exit Sub
Working...