I was changing a few things in my database when I came across this error, doesn't like my code when I am trying to use the comma to seperate the last ans first name, thinks i am at the end of a line. How can I fix this? Thanks
Code:
Private Sub Check76_AfterUpdate()
If Me!Check76 Then 'is true
Me.List26.RowSource = "SELECT tblStaff.ID, [LastName] & ", " & [FirstName] AS Expr1, tblStaff.FirstName, IIf(tblStaff.Current,'Yes','No') AS txtIsStaffCurrent FROM tblStaff ORDER BY tblStaff.LastName;"
Else
Me.List26.RowSource = "SELECT tblStaff.ID, [LastName] & ", " & [FirstName] AS Expr1, tblStaff.FirstName, IIf(tblStaff.Current,'Yes','No') AS txtIsStaffCurrent WHERE (((tblStaff.Current) = True)) ORDER BY tblStaff.LastName;"
End If
End Sub
Comment