P
Paul Dennis
I am trying to select all records from table T_Availability where ITEM =
E_ITEM, SEVERITY = E_SEVERITY, however I can't get the following to work. I
get problems on the WHERE. I get a "Data type conversion error", however both
ITEM & E_ITEM are both strings - If I remove the WHERE clause then it works
fine but then when the .FindFirst is done it returns nothing - help.
Dim rst As DAO.Recordset
Dim strItem As String
Dim DB As DAO.Database
Set DB = CurrentDb
Set rst = DB.OpenRecordset( _
"SELECT ITEM, SEVERITY, PROBLEM_ID " & _
"FROM T_Availability ORDER BY ITEM", _
"WHERE ITEM = E_ITEM", _
dbOpenSnapshot)
strItem = "ITEM = '" & E_ITEM & "'"
rst.FindFirst strItem
E_ITEM, SEVERITY = E_SEVERITY, however I can't get the following to work. I
get problems on the WHERE. I get a "Data type conversion error", however both
ITEM & E_ITEM are both strings - If I remove the WHERE clause then it works
fine but then when the .FindFirst is done it returns nothing - help.
Dim rst As DAO.Recordset
Dim strItem As String
Dim DB As DAO.Database
Set DB = CurrentDb
Set rst = DB.OpenRecordset( _
"SELECT ITEM, SEVERITY, PROBLEM_ID " & _
"FROM T_Availability ORDER BY ITEM", _
"WHERE ITEM = E_ITEM", _
dbOpenSnapshot)
strItem = "ITEM = '" & E_ITEM & "'"
rst.FindFirst strItem