Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Query in Module

Status
Not open for further replies.

boborsipho

Programmer
Sep 6, 2002
14
ZA
I've been struggling for a while now.

How do I run a Select query in a module in MS Access?

I tried everything:

Dim sql As String
Dim rs As Recordset
Dim db As Database
Set f = Forms!frmCalender
sql = <<SQL Statement>>
Set db = CurrentDb()
Set rs = db.OpenRecordset(sql, dbOpenSnapshot)

This code gives me: &quot;Too few parameters. Expected 1&quot; - Error

What am I doing wrong?

Thank you
Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top