Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.Find error 1

Status
Not open for further replies.

girky

Programmer
Oct 24, 2002
72
US
Hello
I'm getting the error "error 3001 - Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another." when i get to the .find line in my code when i hit a line where the criteria is not numeric. It works fine until I hit a vendor that is alphanumeric.
Here's my code:
---------------------------
sCriteria As String, sGL As Long
rsAPVM As New ADODB.Recordset, rsAPVMGL As New ADODB.Recordset
rsAPVM.Open "qryAPVM", conn, adOpenKeyset, adLockReadOnly, adCmdStoredProc
rsAPVMGL.Open "qrygl", conn, adOpenKeyset, adLockReadOnly, adCmdStoredProc

sCriteria = "[Vendor ID]=" & rsAPVM![Vendor ID]
rsAPVMGL.MoveFirst
rsAPVMGL.Find sCriteria
sGL = rsAPVMGL!GLAcct
--------------------------


thanks for your help!
 
sCriteria = "[Vendor ID]=[tt]'"[/tt] & rsAPVM![Vendor ID] & [tt]"'"[/tt]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Awesome, that worked.
Thanks so much for your help!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top