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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ACCESS97 Query questions 1

Status
Not open for further replies.

m3hosting

MIS
May 10, 2001
8
US
I have a table tblChangeRecords with lots of fields. Most are two words. I want to reference the record via an ordinal. Below is a query to the database. How do I reference ordinal 1 for instance.

"SELECT * FROM tblChangeRecords"

Thanks in advance
 
In general, you can't assume that the rows in a relational table (or query) are in any particular order unless you use an ORDER BY clause. Thus, it's hard to see why you would want to select a record from this query by its ordinal position. The normal way to select records is to use a WHERE clause to find records having certain values in certain columns. If one of those columns is the primary key, or is indexed with the Unique attribute, you can select a specific record that way.

Maybe you want to access all the records, and don't care about what order they're in, so you want to read them in their arbitrary sequence. But you would normally do this using a form, selecting records using the navigation bar at the bottom.

So what it comes down to is, exactly what do you intend to do--access a single record, or each record--and how will the data be used--in VBA code, or shown in a datasheet window? Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top