AccessDiscussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
I am using a list box to select the record to display when opening another form in Access 2002(XP). When I run this code from a command button, I get an error message that says:
Run-time error '2450':
Microsoft Access can't find the form 'frmTest' referred to in a macro expression or Visual Basic code.
The form that won't open is in the same database and can be opened by this code:
Here is my code:
Dim rst As Recordset
Set rst = Forms!frmTest.RecordsetClone 'here is where the code stops
rst.Find "CustomerNumber = " & List0
Forms!frmTest.Bookmark = rst.Bookmark
DoCmd.Close acForm, "frmGoToRecordDialog"
Thanks for the reply Steven. I tried you suggestion, but I am still having problems and think maybe I should just make it a VB application. It will be a lot more work, but VB seems to be more stable for me.