|
-
Sep 28th, 2000, 05:11 AM
#1
Thread Starter
Addicted Member
I do a Rs.Movelast if I'm at EOF and rs.MoveFirst at BOF. Sometimes this works and sometimes i get an error saying the action was cancelled by an associated object. I can see my recordcount and there are records present (usually about 2 or 3 in each recordset). What else can I look at to get a clue why this sometimes works and sometimes not??
-
Sep 28th, 2000, 06:34 AM
#2
Member
Question ???
What exactly are you trying to do ?
Is it something like ....
RS.MOVEFIRST
Do until RS.EOF
.....
.....
RS.MOVENEXT
LOOP
-
Sep 28th, 2000, 08:00 AM
#3
Thread Starter
Addicted Member
I have next and previous buttons and if previous is hit whilst BOF I need to MoveFirst and if next is hit at EOF I ned to MoveLast - in some cases this works and others it doesn't.
-
Sep 28th, 2000, 09:38 AM
#4
Member
In that case why not check the state before doing the operation.
ie. Check for EOF/BOF then MoveLast/MoveFirst if not in that state.
Bob
-
Sep 28th, 2000, 10:09 AM
#5
Thread Starter
Addicted Member
My code is
On previous record button:
If Rs.BOF Then
Rs.MoveFirst
End If
This works in some cases for some recordsets - on others I get 'this action was cancelled by an associated object' run-time error 3426.
What I'm not sure of is how to check what is going on. The recordset is at Bof and BOf action is MoveFirst.
-
Sep 28th, 2000, 11:10 AM
#6
Lively Member
Are you changing the values of the fields before doing the move? I have seen a similar problem where data was entered which was longer than the field would allow. It came up with the same error. I suspect it is related to this.
-
Sep 28th, 2000, 12:59 PM
#7
Thread Starter
Addicted Member
No I'm not chamging anything, any suggestions welcome as it's driving me nuts - especially as it works 90% of the time!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|