How do I read an Access Table by key?

PRD

Registered User.
Local time
Today, 06:26
Joined
May 18, 2011
Messages
72
I have a 25,000 record Table with a key. I am familiar with the MoveFirst, MoveNext, etc. commands but cannot seem to find any infomation which will tell me how to read a Table by the key - a ‘MoveKey’ command if you will.


Rather than reading through all 25,000 records with the MoveNext command to find the record I’m interested in it would be nice to go right to the record with one read. Can you give me the syntax for reading a record by the key?


Also, what would the syntax be if the record cannot be found (in the ancient language of COBOL we called this an ’Invalid Key’ clause). Thank you for your time.
 
jdraw -

Thank you for your help. Is there a manual or other Websites you can recommend that will cover programming commands in more detail? The manuals I have are pretty basic (and useless). Thank you for your time.
 
if you find the record on a form use the .FindFirst as suggested.
if you open a recordset use the WHERE clues to filter only the record you want.
 

Users who are viewing this thread

Back
Top Bottom