Index of a combination of two fields 
Author Message
 Index of a combination of two fields

Dear,

I have build an index of a combination of two text fields in Access. When I
try to seek the record in VBA, I get a nomatch.
The fields "02166" and "1" both text type.

    rs.Seek "=", "021661"

Thanks in advance,

Dirk Batenburg



Mon, 19 Dec 2005 03:53:04 GMT  
 Index of a combination of two fields

Quote:
> Dear,

> I have build an index of a combination of two text fields in Access.
> When I try to seek the record in VBA, I get a nomatch.
> The fields "02166" and "1" both text type.

>     rs.Seek "=", "021661"

> Thanks in advance,

Hi, Dirk!

Try

    rs.Seek "=", "02166", "1"

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)



Mon, 19 Dec 2005 04:44:03 GMT  
 Index of a combination of two fields
Hi,

Thanks a lot, it works.

Dirk Batenburg



Quote:


> > Dear,

> > I have build an index of a combination of two text fields in Access.
> > When I try to seek the record in VBA, I get a nomatch.
> > The fields "02166" and "1" both text type.

> >     rs.Seek "=", "021661"

> > Thanks in advance,

> Hi, Dirk!

> Try

>     rs.Seek "=", "02166", "1"

> --
> Dirk Goldgar, MS Access MVP
> www.datagnostics.com

> (please reply to the newsgroup)



Mon, 19 Dec 2005 05:01:45 GMT  
 Index of a combination of two fields
Gee, that is cool! I did not know that.

Of couse...double darn...I don't use seek!

--
Albert D. Kallal     (MVP)
Edmonton,  Alberta Canada

http://www.attcanada.net/~kallal.msn



Mon, 19 Dec 2005 13:38:40 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. I can't add a key (index) on two fields using VB

2. How to index on two fields, one descending

3. need help opening a two field index with VB6 using access 2000

4. Two indexes on one field!

5. How do I Create two field index

6. remove index from field or delete a indexed field

7. Primary key is a combination of two keys

8. Primary key is a combination of two keys

9. Primary key is a combination of two keys

10. combination field in timeline view

11. Combinations of Field values

12. Combinations of fields

 

 
Powered by phpBB® Forum Software