J
jrtmax
I am trying to set a variable equal to the result of a sql query all within
VB (Access Form Code). Here is an excerpt from my code:
Dim lsSQL As String
lsSQL = "SELECT [5_Deficiency_Item].[Magnitude] from [5_Deficiency_Item] " & _
"WHERE [5_Deficiency_Item].[Item_ID] = " & Me![Item_ID] & ""
Dim loQD As DAO.QueryDef
Set loQD = loDB.CreateQueryDef("", lsSQL)
Dim msMagnitude As Long
msMagnitude = "Call loQD.Execute"
It doesn't like the line msMagnitude = "Call loQD.Execute"
What can I do?
Thanks!
VB (Access Form Code). Here is an excerpt from my code:
Dim lsSQL As String
lsSQL = "SELECT [5_Deficiency_Item].[Magnitude] from [5_Deficiency_Item] " & _
"WHERE [5_Deficiency_Item].[Item_ID] = " & Me![Item_ID] & ""
Dim loQD As DAO.QueryDef
Set loQD = loDB.CreateQueryDef("", lsSQL)
Dim msMagnitude As Long
msMagnitude = "Call loQD.Execute"
It doesn't like the line msMagnitude = "Call loQD.Execute"
What can I do?
Thanks!