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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'Phantom' Seek Error

Status
Not open for further replies.

MysticBadger

Programmer
Jan 8, 2007
1
GB
Hi

I have a strange problem using the Seek method of a recordset. I am using VB6 and an Access2000 database via DAO.

This problem is on this line:

RS.Seek "=", Keys(1)

It just seeks the first entry which matches the value of my Keys() array (in this instance there is only one entry, but this code caters for situations of up to 6 key fields).

The error I get is 3421: Data type conversion error. I have checked the field type is numeric and I'm seeking valid data (in this case 1, 2, 3, 4, 5...).

The weird part is this; I run the code and get the error, click debug and the line above is highlighted - but if I press F5 (run), the line is correctly processed without any changes being made! It then crashes on this line again next time through the loop.

Any ideas? All suggestions gratefully received.

Cheers

MysticBadger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top