Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recording the first ID number in a table as a variable

Status
Not open for further replies.

gal4y

Technical User
Dec 24, 2001
72
US
I would like to capture (record) the first records ID number (which starts with 1830) so I can use it with arrays. The ID number is a field in my Score table. How do I record that first ID number as a variable (StartID)??

Dim db As Database, rs As DAO.Recordset
Dim SQLString As String
Dim StartID as Integer

Set db = CurrentDb
Set rs = db.OpenRecordset("Score")

StartID =????

Thank you for your assistance in advance
Greg
 
If you mean the lowest ID number in the table use SELECT MIN(IDNumber) FROM Table.

Durkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top