By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,501 Members | 831 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,501 IT Pros & Developers. It's quick & easy.

DblClickNotInList Finally Fixed

P: n/a
DD
Ok it is all working,, for anyone who wants to know, this is what went
wrong and how it was fixed.

qryOrder has 3 tbls, tblOrder,tblCustomer,tblShipper

frmOrder (bound to qryOrder)has a Combo for CustomerID, Events
NotInList and DblClick in combo
The folloing code would only work if the frmOrder was bound to
tblOrder this is ok if you were only retriving information from the
tblOrder, in qryOrder my qry has fields from the other tbls and
everytime i dblclicked it kept sending me a Null error.
Dim lngCustomerID As Long

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

Exit Sub
In order for me to use this code which also is part of OpenArgs and
helps to assign the new customer to the combobox i changed the
following

Dim lngCustomerID As Long

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

I dont know it could be something to do with the way i have built the
system

DD
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.