472,096 Members | 1,360 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,096 software developers and data experts.

Want to update only one field (rs3!a_votes)... it is giving runtime error '3021'

rs3.Move (Index)
rs3!a_Votes = Val(Text2(Index).Text) + 1

here index is working... dont bother about that...

but this is not working.. can any one edit this code????
it is giving "either bof or eof is true"

help me...
Dec 24 '11 #1
1 1346
8,435 Expert 8TB
Kind of a tough one, given the available info so far. But I'm going to take a stab at it.

I believe the relevant point here is that error 3021 indicates that the recordset does not have a current record. So really, the only possibilities I can see here are that either there are no records, or your Move has gone "out of bounds".

I'd say the chances are that despite your assurances to the contrary, your index value isn't as right as you think. Remember that many indexes in VB are (very annoyingly, in my opinion) zero-based. So for example, in a listbox with 5 entries, they are not numbered 1 to 5. They are numbered 0 to 4. This very frequently trips people up.

Oh, by the way - what version of VB is this? And what type of recordset (could be ADO, DAO, not sure whether there are others by now).
Dec 27 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by gagonm | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.