record navigation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
sorry, this makes sense not sure where to put the code, kind of new to access.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top