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


Reply
 
Thread Tools Display Modes
  #1  
Old 09-27-2005, 04:54 AM
achowe achowe is offline
Regular
 
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....

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

sorry..error is RunTIme error 3061

Too few parameters, expected 1

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

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

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


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

Advertisement:





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.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
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..
subscribe
 
 
-->