|
-
Nov 26th, 2000, 06:36 PM
#1
Thread Starter
Hyperactive Member
How would I make an if statement for if it's the last record in the recordset to do something?
Thanks.
I tried (if rst.EOF) but that didn't work.
If you think education is expensive, try ignorance.
-
Nov 27th, 2000, 07:22 AM
#2
Lively Member
Why don't you MoveLast and do something prior or after you had finished with your other records?
Regards.
KT
-
Nov 27th, 2000, 08:23 AM
#3
New Member
You are geaded in the right direction... try:
If rst.eof=true then
...
End If
Mordechai Boehm
LaserStreak Consulting
www.LaserStreak.com
-
Nov 27th, 2000, 09:55 AM
#4
Junior Member
Reply
Navigate through the recordsets using:
while not rs.eof
....
....
do something
....
wend
To work upon the last record only use
rs.MoveLast
Happy Programming!
-
Nov 27th, 2000, 10:17 AM
#5
Thread Starter
Hyperactive Member
Thank you. I will try those suggestions.
If you think education is expensive, try ignorance.
-
Nov 27th, 2000, 10:23 AM
#6
Fanatic Member
I believe that if you Movelast, then use a For...Next loop based on the recordcount, you'll get better performance (specially if you have a lot of records in the recordset)...
-
Nov 27th, 2000, 11:01 AM
#7
Thread Starter
Hyperactive Member
What I'm building is a shopping cart. Each product is being pulled from a database and after writing each table I do an rst.MoveNext. The only problem is while pulling it from a database using the relationships I have setup it needs to do something different on the last one. The records will probably be less than 20 or 30 (at most) so rst.EOF = True should work I think.
If anyone has any suggestions please let me know.
If you think education is expensive, try ignorance.
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
|