D
dmericksen
I need help. I cannot identify the problem. I am trying to assign a query
output to certain variables. I am getting a 3078 error and it looks like it
is happening on line 12. They query is working fine when I run it manually.
Please see the code below.
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strSQL As String
Dim m1 As String
strSQL = "SELECT TOP 1 captionReference.metric1"
strSQL = strSQL & " FROM captionReference"
strSQL = strSQL & " WHERE
(((captionReference.id)=[Forms]![3-1_modAdVariables]![clientId]));"
Set db = CurrentDb
Set rst = db.OpenRecordset("strSQL")
m1 = rst.Fields("[metric1]")
output to certain variables. I am getting a 3078 error and it looks like it
is happening on line 12. They query is working fine when I run it manually.
Please see the code below.
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strSQL As String
Dim m1 As String
strSQL = "SELECT TOP 1 captionReference.metric1"
strSQL = strSQL & " FROM captionReference"
strSQL = strSQL & " WHERE
(((captionReference.id)=[Forms]![3-1_modAdVariables]![clientId]));"
Set db = CurrentDb
Set rst = db.OpenRecordset("strSQL")
m1 = rst.Fields("[metric1]")