Hello,
I am trying to write a query that selects a row from another table with a
field that matches the Me!RecordingID that's on the form. For some reason my
query is not working and the recordset I am trying to build will not open.
Can someone help me with this? Thanks for your help!
Else
'Update ItemsTable record with new info
Debug.Print ("attempting to open recordset")
If Me.ItemID <> Null Then
'Opens the recordset, getting the matching row from the itemstable with
the current itemid
rst.Open _
"SELECT FROM * ItemsTable *" _
& "WHERE ItemsTable.[ItemID] = Me![RecordingID]" _
& " And Me![ItemID] = ItemsTable.[EntryID], CurConn, , , adCmdText"
End If
'Recorset Status
If rst.State = 1 Then
Debug.Print ("Open Recordset! " & rst.RecordCount & " Records Selected")
'Determines whether records were found in the query
If rst.RecordCount <> 0 Then
rst![ItemAccessed] = Me![lblAccessed].Caption
rst![ItemModified] = Me![lblModified].Caption
rst.Update
MsgBox ("Record Updated Successfully!!")
End If
End If
Set rst = Nothing
CurConn.Close
End If
-Yaw