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
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