By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 967 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

how to go to a particular record using recordcount

P: 2
here is my problem.

i have two records. one containing 20 records and second containing 30 records.
now i want the recordcount property to use and go to the 21 record.
i m calculating the recordcount of both the record. now i m doing this
Expand|Select|Wrap|Line Numbers
  1.  a =  rs.recordcount 
  2.  b =  rs1.recordcount 
  3.  
  4. for x = b+1 to  a 
  5.  
  6.   rs.move(x)
  7.  
  8.  
but its not going to 21 record but it is going to 22 nd record.

can anyone please help me wiith that . how i can go to the 21 record using recordcount .
Apr 8 '07 #1
Share this Question
Share on Google+
2 Replies


iburyak
Expert 100+
P: 1,017
Try this:

[PHP]
rs.MoveFirst
rs.Move 21[/PHP]

Always move to first before moving to any number. Otherwise it will be relative to current record.

Example:
If you are on record 5 and you say
rs.move 21
It will go to 21st record starting from 5 it will appear on 26.

Good Luck.
Apr 9 '07 #2

100+
P: 375
Try this:

[PHP]
rs.MoveFirst
rs.Move 21[/PHP]

Always move to first before moving to any number. Otherwise it will be relative to current record.

Example:
If you are on record 5 and you say
rs.move 21
It will go to 21st record starting from 5 it will appear on 26.

Good Luck.
Thank you iburyak. I have a similiar problem. I will sort now.
Apr 9 '07 #3

Post your reply

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