MysticBadger
Programmer
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
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