How to move cursor on my desired position specifying primary key 
Author Message
 How to move cursor on my desired position specifying primary key

  I want to move a cursor on my desired position in a recordset
specifying primary key. If primary key is single, using Find method
is useful. But primary key in my table is multiple. I tried Filter
property, but the effect didn't match my expectation. It changed
the recordset by filtering.
  Does anyone give me good idea? Thanks in advance.

Takashi Masuda



Mon, 10 Oct 2005 07:13:54 GMT  
 How to move cursor on my desired position specifying primary key
Look up the Index property and the Seek method. Or just scan your recordset
using Find for the first component of your key and check for equality of the
other components.

PZ


Quote:
>   I want to move a cursor on my desired position in a recordset
> specifying primary key. If primary key is single, using Find method
> is useful. But primary key in my table is multiple. I tried Filter
> property, but the effect didn't match my expectation. It changed
> the recordset by filtering.
>   Does anyone give me good idea? Thanks in advance.

> Takashi Masuda



Mon, 10 Oct 2005 15:23:19 GMT  
 How to move cursor on my desired position specifying primary key
Hi,

How is it possible that PK has same value in several records? Is it compound
PK (multiple fields)? What you could do is to sort your recordset by PK
field(s). Then use Find to find first record. Now you have only one chose -
look though the records and find first matching. Since recordset was sorted,
you do not have to loop through all the records in a recordset, but just
through those one, which have same PK value

--
Val Mazur
Microsoft MVP


Quote:
>   I want to move a cursor on my desired position in a recordset
> specifying primary key. If primary key is single, using Find method
> is useful. But primary key in my table is multiple. I tried Filter
> property, but the effect didn't match my expectation. It changed
> the recordset by filtering.
>   Does anyone give me good idea? Thanks in advance.

> Takashi Masuda



Mon, 10 Oct 2005 20:34:58 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Joined Primary Key in Foxpro (Make 1 Primary Key from 2 fields)

2. Help: Make Table Query - Specify Primary Key?

3. Select Row in WinForm DataGrid when Primary Key specified

4. How using ADO Create a Table and Specify that a Field is autoNumber and Primary Key

5. Moving primary key from one field to another

6. Moving Mouse Cursor to position and click

7. Repost: Stop up\down cursor keys moving between (text) form fields in a protected document

8. Stop up\down cursor keys moving between fields?

9. how to create a box that can be moved with cursor keys or mouse

10. Arrow key to move cursor to next textbox???

11. Arrow keys to move cursor to next textbox.

12. Primary key is a combination of two keys

 

 
Powered by phpBB® Forum Software