I will gladly apricate any help from this forum regarding this code.
I am passing various value from one from to another. The first part of the SQL works fine by when I adding another value it does not work. I tried the value with a variable and still I get the mismatch.
	
	
	
		
 I am passing various value from one from to another. The first part of the SQL works fine by when I adding another value it does not work. I tried the value with a variable and still I get the mismatch.
		Code:
	
	
	Private Sub Form_Open(Cancel As Integer)
Call taskschedule
Me.AllowEdits = False
Dim SQLDataSource As String
Dim STWhere As String
Dim Benf As Integer
 
Benf = Forms!frbillingtest!benefitsid
 
    SQLDataSource = " SELECT * FROM tbtaskschedule WHERE TaskAssignedTo = " & TempVars![SYSID] And TaskBenefitID = "  & forms!frbillingtest!benefitsid  "
    
    
    
    Me.RecordSource = SQLDataSource
    Me.Requery
End Sub