Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > VBA / Office Integration > Word, PowerPoint, Outlook, and Other Office Products > Run Time Error 3061

Thread Tools Display Modes
Old 09-27-2005, 04:54 AM
achowe achowe is offline
Join Date: Nov 2003
Posts: 50
Default Run Time Error 3061

Can anyone help with this? When I run the following code I get an error on the last line....

sqltxt = "someQuery"
    db.CreateQueryDef "qry_" & currstruc, sqltxt
    Set rst = db.OpenRecordset("qry_" & currstruc)
Thanks guys!
Reply With Quote
Old 09-27-2005, 04:56 AM
achowe achowe is offline
Join Date: Nov 2003
Posts: 50

sorry..error is RunTIme error 3061

Too few parameters, expected 1

Reply With Quote
Old 09-28-2005, 02:34 AM
Qwanta's Avatar
Qwanta Qwanta is offline
Join Date: Dec 2003
Location: The Netherlands
Posts: 164

I'm not sure what you mean, but maybe this is a solution

Dim strText as string Dim db as Database Dim rst as Recordset strText = "Select * from tbl_*" Set db = CurrentDb() Set rst = db.OpenRecordset(strText)
Electricity is really just organized lightning.
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..