Double click resolves to none

spleewars

Registered User.
Local time
Today, 12:22
Joined
Jan 28, 2011
Messages
28
I've been struggling several time with this problem and apparently its driving me a little crazy: i have this code

Code:
Private Sub CodeNumber_DblClick(Cancel As Integer)
DoCmd.OpenForm "Products", , , _
        "[products.codenumber]=" & "'" & Me.CodeNumber & "'"

End Sub

I cannot understand why on other forms this code works flawlessly and sometimes on others no. I have used this sort of code many other times on lots of other forms and worked properly but in this one, nope! The form automatically open on double click and where it is suppose to load the record, the form 'products' open itself with no loaded record.

What in the heck is wrong?
 
I've been struggling several time with this problem and apparently its driving me a little crazy: i have this code

Code:
Private Sub CodeNumber_DblClick(Cancel As Integer)
DoCmd.OpenForm "Products", , , _
        "[products.codenumber]=" & "'" & Me.CodeNumber & "'"

End Sub
I cannot understand why on other forms this code works flawlessly and sometimes on others no. I have used this sort of code many other times on lots of other forms and worked properly but in this one, nope! The form automatically open on double click and where it is suppose to load the record, the form 'products' open itself with no loaded record.

What in the heck is wrong?

Update:
Further testing made: removed all code and enabled and unlocked some disabled fields from form Products, changed "'" with "", "#" and tried this code as well:

"[products.codenumber]=" & "'" & Forms![search_advancedstock]![search-advancedstock-datasheet]![CodeNumber] & "'"

and still nothing...
 

Users who are viewing this thread

Back
Top Bottom