parkfairfax
Programmer
Can someone tell me if you think the following code is valid? I cannot get it to work on my computer...someone in my office says you can't do this, that is set your recordsetclone = to a form name. However the book is "Microsoft Access 2000, Visual Basic Applications Fundamentals...by Evan Callahan. Subscribers is both a form and a table. GoToRecordDialog is also a form.
Private Sub ShowRecord_Click()
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 = " & Forms!GoTorecordddialog.List2
'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
Thank you,
GM
Private Sub ShowRecord_Click()
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 = " & Forms!GoTorecordddialog.List2
'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
Thank you,
GM