record navigation

S

Steveo

Does anybody know any code that will open a table and go to a certain record
number?

I have the subform of the records on part of my main form. all data that I
need starts at record number 31 on the subform. trying to find a way to have
that open to that record number each time. thank you
 
G

Graham R Seach

Steve,

Record numbers have no meaning in a relational database. The 31st record may
not end up being the 31st record next week, or even tomorrow.

The only way to guarantee that you will work with a range of records is to
tell Access that that's what you want to do. Filter the form's RecordSource:
SELECT * FROM myTable WHERE somefield >= 31

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
G

Graham R Seach

Steve,

See the form's RecordSource property. At present it's likely to be the name
of a table. Just add the following pseudo code and change "myTable" to the
name of the table, and change "somefield >= 13" to whatever criteria makes
sense.

SELECT * FROM myTable WHERE somefield >= 31

If you still have trouble figuring out what to do, let us know what your
table name and structure is, and what criteria makes sense, and we can help
write the appropriate query.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
Top