I've searched many sites and have tried a few examples but can't get anything to work with what I'm doing and can't figure out how to get it to work with my code. I'm trying to open a recordset to read a value in a field and assign that value to a select list. I keep getting the same error listed in the title.
Dim dbs As Database
Dim rst As Recordset
Set dbs = CurrentDb
If (Not (IsNull(OccurrenceReportID))) Then
'*** FALL TYPE START ***
Set rst = dbs.OpenRecordset("Select dbo_Falls.OccurrenceReportID,dbo_FallOccurrenceTyp e.FallOccId,dbo_FallOccurrenceType.FallOccType FROM dbo_FallOccurrenceType INNER JOIN dbo_Falls ON dbo_FallOccurrenceType.FallOccId = dbo_Falls.FallOccId WHERE OccurrenceReportID =" & OccurrenceReportID)
Do While (Not (rst.EOF))
Select Case rst!FallOccId
Case 1
Me.cbo_FallOccType.Value = "Out-patient clinic/property"
Case 2
Me.cbo_FallOccType.Value = "In-patient at MOA"
Case 3
Me.cbo_FallOccType.Value = "ED"
Case 4
Me.cbo_FallOccType.Value = "Other area at MOA"
End Select
rst.MoveNext
Loop
rst.Close
Set rst = Nothing
End If
Any help is appreciated, thanks.