Hi Bernie and welcome to DaniWeb :)
That code looks fine, can you move the creation of your variant array outside the function and step into the Locate to see exactly where the error occurs?
VarArray := VarArrayOf([sPhone, sTitle, sAddLine2]);
bFound := tblComp.Locate('CompPhone;Title;AddLine2', VarArray, []); // <- step in here using debugger
darkagn
Veteran Poster
1,197 posts since Aug 2007
Reputation Points: 404
Solved Threads: 200