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

Don't Want to Create New Record When Going Past the Last Record

Status
Not open for further replies.

kopy

Technical User
May 30, 2002
141
US
I've used the Command Button Wizard to create a button that goes to the next record. When I'm at the last record of the recordset, how do I keep it from going to the next record and creating a new record?

Here's my current code.
Thanks, Kopy05
=======================================================
Private Sub Command47_Click()
On Error GoTo Err_Command47_Click


DoCmd.GoToRecord , , acNext

Exit_Command47_Click:
Exit Sub

Err_Command47_Click:
MsgBox Err.Description
Resume Exit_Command47_Click
 
Have a look at the EOF and BOF properties for recordsets in Access help.

"Don't be irreplaceable. If you can't be replaced, you can't be promoted."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top