T
Tammy
I am getting an error on a dlookup command. I have it in
use in other situations, but the last two times I have
tried to use it, I am getting this message: "you canceled
the previous operation" Run time error message 2001. I
have tried looking on the knowlege base and searching
questions on here with no luck!
Here is what I have for code (just one instance). Both
that are not working use variables for the criteria.
Dim strName As String
strName = Me![txtName]
Me![txtSOPid] = DLookup("[SOPid]", "tblMain", "[SOP_Name]
= """ & strName & """")
With CodeContextObject
DoCmd.GoToControl "txtSOPid"
DoCmd.FindRecord (.txtSOPsearch), acEntire, False, ,
False, acCurrent, True
End With
Me![cmdGetSOP].Visible = True
Me![cmdGetSOP].SetFocus
THANKS!
use in other situations, but the last two times I have
tried to use it, I am getting this message: "you canceled
the previous operation" Run time error message 2001. I
have tried looking on the knowlege base and searching
questions on here with no luck!
Here is what I have for code (just one instance). Both
that are not working use variables for the criteria.
Dim strName As String
strName = Me![txtName]
Me![txtSOPid] = DLookup("[SOPid]", "tblMain", "[SOP_Name]
= """ & strName & """")
With CodeContextObject
DoCmd.GoToControl "txtSOPid"
DoCmd.FindRecord (.txtSOPsearch), acEntire, False, ,
False, acCurrent, True
End With
Me![cmdGetSOP].Visible = True
Me![cmdGetSOP].SetFocus
THANKS!