473,387 Members | 1,528 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

how to go to a particular record using recordcount

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
2 2149
iburyak
1,017 Expert 512MB
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
cmrhema
375 256MB
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

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

Similar topics

10
by: Alain Guichaoua | last post by:
Good evening to all Here is my problem : I have a form with a subform. They are linked. When I open the form I would like the subform to reach its last record. I tried the method...
5
by: Ilan Sebba | last post by:
When it comes to adding records in related tables, Access is really smart. But when I try to do the same using ADO, I am really stupid. Say I have two parent tables (eg Course, Student) and one...
6
by: 6thirty | last post by:
Hi, I've created a stocktaking database using Access XP. This is indexed by two fields - part number and shelf location. I am currently inputting all the data via a form. When I have entered a...
1
by: Ryan | last post by:
I've got a problem I have't run up against before. I generally test for an empty recordset using BOF and EOF. Today, for the first time I ran into a problem where my recordset shows BOF and EOF =...
8
by: MLH | last post by:
Before running the following line of code, I would like to first know if there is another record in the form's record source. If I run this line when the last record is current, an error is...
7
by: Mike | last post by:
I have a form where I have turned off the default navigation buttons. I then created my own. This works fine. The only questions that I have is on the default navigation buttons it shows total...
26
by: Jimmy | last post by:
ill have a database with 1 table and 3 fields: ID FIRSTNAME LASTNAME (the ID field will be the auto incrementing index) there might be 10 records in the DB, there might be 10,000. i...
0
by: GeryLuz | last post by:
Hi !! I have a problem showing a users table in an ASP page. It shows me only one record when i checked that there are more than one in my table. But when i print the RecordCount property of...
4
by: aaronyoung | last post by:
I have created custom navigation buttons and Record Number indicators on several forms that are used to review and update records based on a query. My On Current event to update the "Record X of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.