Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / December 2005

Tip: Looking for answers? Try searching our database.

OpenRecordset help needed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chris.thompson13@ntlworld.com - 07 Dec 2005 13:21 GMT
Any good advice to help solve this problem would be most welcome.

I can not open a recordset based on a query (called qryNoDateSetYet).
The qryNoDateSetYet uses another query within it called qryInputSat.
qryInputSat takes a parameter from a control on an open form.

I get the 3061 run-time error asking for the parameter.

How can I get the recordset to open? - it's driving me mad.

My thanks in advance for any help offered.

Chris.
Tom van Stiphout - 07 Dec 2005 14:01 GMT
Give it the parameter.
1: dim qd as dao.querydef
2: dim rs as dao.recordset
3: set qd=currentdb.querydefs("myquerydef")
4: qd.Parameters(0) = Forms!MyForm!MyControl
5: set rs=qd.openrecordset(dbOpenSnapshot)

If you want a named parameter, set a breakpoint on line 4 and in the
debug window enter:
?qd.parameters(0).name
Then write:
4: qd.Parameters("myname") = Forms!MyForm!MyControl

-Tom.

>Any good advice to help solve this problem would be most welcome.
>
[quoted text clipped - 9 lines]
>
>Chris.
chris.thompson13@ntlworld.com - 07 Dec 2005 14:20 GMT
Tom

Just what was needed.  Thank you so much for your help and for your
time.  It is very much appreciated.

Chris.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.