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

RST reference not working

Status
Not open for further replies.

parkfairfax

Programmer
May 22, 2001
63
US
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

 
I found the solution to this. This code does work, but you have to have the subscribers form open at the time you run the GoToRecordDialog Form. Once the entire exercise is completed the code does work as described.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top