I have the following code and it is giving me the missing operator error and I can not figure out how to fix it. Any help will be greatly appreciated.
	
	
	
		
 
		Code:
	
	
	Option Compare Database
Option Explicit
Private Sub Form_Open(Cancel As Integer)
Call taskschedule
Me.AllowEdits = False
Dim SQLDataSource As String
Dim AppUser As Integer
 
If TempVars("usersecurity") <> 1 Then
    SQLDataSource = " SELECT * FROM tbtaskschedule WHERE TaskAssignedTo =  & TempVars![SYSID] & "
    
Else
    SQLDataSource = " SELECT * FROM tbtaskschedule"
    
End If
    Me.RecordSource = SQLDataSource
    Me.Requery
End Sub