ordendelfai
Technical User
Hello,
I am very new to VBA, and am having trouble getting this to work.
I want to take the returned value (1 result) of the below SQL statement, and assign it to a variable in VBA.
I have tried:
Private Sub Test()
Dim vProd1
vProd1 = "SELECT TOP 1 [Prod1] FROM
tbl_Client_Employee_Contrib ORDER BY [Prod1];"
End Sub
But that doesn't work at all, vProd1 just returns the sql string itself.
If you can help, would really appreciate! ;0)
~Orden
I am very new to VBA, and am having trouble getting this to work.
I want to take the returned value (1 result) of the below SQL statement, and assign it to a variable in VBA.
I have tried:
Private Sub Test()
Dim vProd1
vProd1 = "SELECT TOP 1 [Prod1] FROM
tbl_Client_Employee_Contrib ORDER BY [Prod1];"
End Sub
But that doesn't work at all, vProd1 just returns the sql string itself.
If you can help, would really appreciate! ;0)
~Orden