I'm trying to use the code below, which is from the book "Access 2002 Visual Basic for Applications", and I get a Run time error 2450..can't find the form. The form is spelled correct, but it still doesn't work. I've verified that the DAO reference was selected.
Private Sub ShowRecord_Click()
' Find the selected record, then close the dialog box.
Dim rst As DAO.Recordset
' Store the recordset for the Subscribers form.
Set rst = Forms!Subscribers.RecordsetClone
' Locate the record for the selected subscriber.
rst.FindFirst "SubscriberID = " & List0
' Set the form's Bookmark property to move to the record.
Forms!Subscribers.Bookmark = rst.Bookmark
' Close the dialog box.
DoCmd.Close acForm, "GoToRecordDialog"
End Sub
Any help would be a life saver.
Private Sub ShowRecord_Click()
' Find the selected record, then close the dialog box.
Dim rst As DAO.Recordset
' Store the recordset for the Subscribers form.
Set rst = Forms!Subscribers.RecordsetClone
' Locate the record for the selected subscriber.
rst.FindFirst "SubscriberID = " & List0
' Set the form's Bookmark property to move to the record.
Forms!Subscribers.Bookmark = rst.Bookmark
' Close the dialog box.
DoCmd.Close acForm, "GoToRecordDialog"
End Sub
Any help would be a life saver.