sql parameter query

M

Mike Klein

Query below prompts for variables, then executes properly. The variables are already defined, and I need the Query t
execute those values. When the query works properly, I'll be passing the parameters to the procedure, but that's a different issue

What am I missing

Thanks
Mik

Public Sub CStores(

Dim c, n, sq As Strin

c = "KINGS
n = "3

sq = "PARAMETERS [c] STRING, [n] STRING;
sq = sq & "INSERT INTO STUDY
sq = sq & "SELECT TOP " & n & " STORE,
sq = sq & "0 AS PANEL FROM DATA
sq = sq & "WHERE COUNTY = '" & c & "';

DoCmd.RunSQL (sq

End Su
 

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