title: How would I go about preventing the user from going into nonexistent records in a database (Visual basic 6.0 using Microsoft DAO 2.5/3.51)
body: <p>Firstly, I am using visual basic 6 because that is what my school teaches.
  We are meant to do a practice project for a supposed client that wants a program that allows employees to interact with a database.
  I have made the First, prev,next and last button for record navigation, however, the issue is that the user is allowed beyond existing records using prev or next and it crashes the program with the error that there is no value</p>
  <p>I have tried things like:
  Making 2 counters, one for the current record that you are on and one for how many records are in the selected recordset. What I thought it would do is that if your current record tries to surpass the recordcount, it will cancel the action, but in the end the recordset.recordcount always returned 1 or 0 for some reason</p>
  <p>I have also tried testing for if the primary key field is blank, but it returns the error that there is no such record</p>
  <p>So how would I go about limiting the user from going beyond the records?</p>