P
Phillip Armitage
Access 2000 with a stored query named "Std Reg Total"
The stored query has a parameter named "Project Number"
Intention is to run the query in vba and insert the resulting records into
an existing table named RESULTS.
In the following subroutine, with the snip representing the dim and set
statements that open the database conenctions, etc, what's the best way to
assign a value of say "05000" to the [Project Number] parameter so that it
can then be used in the [Std Reg Total] stored query?
Private Sub DoCmd_click()
<snip>
SQLstr = "INSERT INTO RESULTS SELECT * FROM [Std Reg Total]"
With cmd1
.ActiveConnection = CurrentProject.Connection
.CommandText = SQLstr
.CommandType = adCmdText
.Execute
End With
End Sub
I look forward to your comments and suggestions.
The stored query has a parameter named "Project Number"
Intention is to run the query in vba and insert the resulting records into
an existing table named RESULTS.
In the following subroutine, with the snip representing the dim and set
statements that open the database conenctions, etc, what's the best way to
assign a value of say "05000" to the [Project Number] parameter so that it
can then be used in the [Std Reg Total] stored query?
Private Sub DoCmd_click()
<snip>
SQLstr = "INSERT INTO RESULTS SELECT * FROM [Std Reg Total]"
With cmd1
.ActiveConnection = CurrentProject.Connection
.CommandText = SQLstr
.CommandType = adCmdText
.Execute
End With
End Sub
I look forward to your comments and suggestions.