D
davethewelder
Hi, I am trying to get a combo box to work where I select the surname from a
drop down list and it displays the other fields of the record in the form.
The code I am using is in the AfterUpdate event and the author is Carl Rapson
Private Sub Combo24_AfterUpdate()
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "[Surname]=" & Me.Combo24 & ""
If Not rs.EOF Then
Me.Bookmark = rs.Bookmark
End If
End Sub
The combo box row source is SELECT TBL_PATIENT.SURNAME FROM TBL_PATIENT
ORDER BY [SURNAME];
The error message I am getting is
Run-time error '3070'
the Microsoft Jet database engine does not recognise 'ALLEN' as a valid
field name or expression.
I am going round in circles so any help would be appreciated.
Davie
drop down list and it displays the other fields of the record in the form.
The code I am using is in the AfterUpdate event and the author is Carl Rapson
Private Sub Combo24_AfterUpdate()
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "[Surname]=" & Me.Combo24 & ""
If Not rs.EOF Then
Me.Bookmark = rs.Bookmark
End If
End Sub
The combo box row source is SELECT TBL_PATIENT.SURNAME FROM TBL_PATIENT
ORDER BY [SURNAME];
The error message I am getting is
Run-time error '3070'
the Microsoft Jet database engine does not recognise 'ALLEN' as a valid
field name or expression.
I am going round in circles so any help would be appreciated.
Davie