Ok, my question seem rather to be either unresolvable. I have posted the following post on other forums to be honest but none replied or came with a decent idea:
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.
Further testing made: removed all code and enabled and unlocked some disabled fields from form Products, changed "'" with "", "#" and tried this code as well:
Code:
"[products.codenumber]=" & "'" & Forms![search_advancedstock]![search-advancedstock-datasheet].CodeNumber] & "'"
again, Products form open but no record information is loaded...
What is wrong?