Hi Folks,
I keep getting the error when I select a name with an apostraphe, such as in the name "O'Connor" :
Run-time error '3075':
Syntax error (missing operator) in query expression
'([Surname-Change]='O'Connor')'.
A Debug highlights the line:
Me.LoansReserva tionsSubform.Fo rm.RecordSource = myCustomerSN
Any help resolving this would be gratefully received.
Thanks
I keep getting the error when I select a name with an apostraphe, such as in the name "O'Connor" :
Run-time error '3075':
Syntax error (missing operator) in query expression
'([Surname-Change]='O'Connor')'.
A Debug highlights the line:
Me.LoansReserva tionsSubform.Fo rm.RecordSource = myCustomerSN
Code:
Private Sub Combo18_AfterUpdate() Dim myCustomerSN As String myCustomerSN = "select * from LoansReservations where ([Surname-Change] ='" & Me.Combo18 & "')" Me.LoansReservationsSubform.Form.RecordSource = myCustomerSN Me.LoansReservationsSubform.Form.Requery Me.Combo8 = Null Me.Combo6 = Null Me.Combo14 = Null Me.Combo12 = Null Me.Combo33 = Null End Sub
Thanks
Comment