473,421 Members | 1,595 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,421 software developers and data experts.

OpenRecordset help needed

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.

Dec 7 '05 #1
2 1486
On 7 Dec 2005 05:21:32 -0800, ch**************@ntlworld.com wrote:

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.

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.


Dec 7 '05 #2
Tom

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

Chris.

Dec 7 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: el Benno | last post by:
If CurrentDb.OpenRecordset("table").EOF Then ... works fine If CurrentDb.OpenRecordset("Query").EOF Then ... doesn't????????? microsft help is outstanding too - surprise surprise any help...
5
by: Philippa | last post by:
I'm trying to access data in vba using the openrecordset command. The data in on a SQL Server 2000 database, and I have linked tables to that data. the Table I'm trying to access is one of these...
8
by: Russell Potter | last post by:
I'm trying to create a recordset using "currentDB.OpenRecordSet", using a query as the "source" string (the only parameter: so all the others are set to their defaults which, I believe, means...
0
by: mo. | last post by:
I need some help in accessing Jet database using DAO. I have just started to learn c# and am trying to rewrite a program I have in vb.net to c#. In VB.Net I can do this: Dim ws As...
5
by: Sunnyrain | last post by:
I am developing a program in Access 2000. I couldn't make OpenRecordset method work right. It's working when I opened a simple SQL query below in OpenRecordset. ..... Dim dbs As Database, rst...
10
by: MLH | last post by:
Gentlemen: I am having one heck of a time taking a DAO walk through the records in an SQL dynaset. I'm trying to walk a set of records returned by a UNION query. I'm attempting to filter the...
22
by: MLH | last post by:
100 Dim db As Database, rst As Recordset 120 Set db = CurrentDb 140 PString = "SELECT qryBatchList.ReadyFor906, qryBatchList.BatchID FROM qryBatchList WHERE...
7
by: mirandacascade | last post by:
The questions are toward the bottom of this post. Situation is this: 1) Access 97 2) Multi-user appplication 3) SQL Server 2000 4) Sporadically (i.e. less than 1% of the time) encounter the...
2
by: nandhinimoorthy | last post by:
Hi , I have a query called "SubQuery".It should return 3 records.When I run that query alone,it is returning 3 records.But when I run through this vba code,and have it's recordcount it gives me...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.