too few parameters. Expected 1

G

Guest

Hello all. Any help is appreciated.

I receive the error message above when performing the following action:

Dim db As DAO.Database
Dim rs As DAO.Recordset

'Export Individual Login_Logout data
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT qry_daily_wg_export_sykes.[name];")
rs.MoveFirst
On Error Resume Next
Do Until rs.EOF
Me.txt_name = rs.Name
DoCmd.OpenQuery "Qry_Daily_Login_Logout_Export"
MsgBox "do you see any values?"
DoCmd.Close acQuery, "Qry_Daily_Login_Logout_Export", acSaveNo

rs.MoveNext
Loop


I have gone back to qry_daily_wg_export_sykes and set parameters within the
query, and still I am having no luck.

Again, thanks for any suggestions.
 
J

John Spencer

First thing that I see is that you need to identify the query that is the
source in a FROM Clause

"SELECT [Name] FROM qry_daily_wg_export_sykes"


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
G

Guest

Thanks for the suggestion. I had the FROM statement included at first, and
it still did not work. I will put it back in since it is needed.


John Spencer said:
First thing that I see is that you need to identify the query that is the
source in a FROM Clause

"SELECT [Name] FROM qry_daily_wg_export_sykes"


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

PiB311 said:
Hello all. Any help is appreciated.

I receive the error message above when performing the following action:

Dim db As DAO.Database
Dim rs As DAO.Recordset

'Export Individual Login_Logout data
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT qry_daily_wg_export_sykes.[name];")
rs.MoveFirst
On Error Resume Next
Do Until rs.EOF
Me.txt_name = rs.Name
DoCmd.OpenQuery "Qry_Daily_Login_Logout_Export"
MsgBox "do you see any values?"
DoCmd.Close acQuery, "Qry_Daily_Login_Logout_Export", acSaveNo

rs.MoveNext
Loop


I have gone back to qry_daily_wg_export_sykes and set parameters within
the
query, and still I am having no luck.

Again, thanks for any suggestions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top