Well, you could use the built-in record selectors for the form, which let the user surf through the records tied to the form. But if this doesn't work for you and you still need to use your own buttons, do a test at the end and change the visible property accordingly, something like:
if Forms!frmName.Recordset.EOF = true then
me.cmdName.visible = false
me.cmdName.visible = true
air code, not guaranteed to work, but it gives you the idea.