I'm trying to write a sql statement where it checks to see if both the subject and date match the subject and date variables respectively... I think I have the syntax correct but not the logic... Can someone tell me what I am doing wrong?
strSQL = "SELECT " & strDbTable & "Topic.Subject, " & strDbTable & "Topic.Event_date, " & strDbTable & "Topic.Forum_ID FROM " & strDbTable & "Topic "
strSQL = strSQL & "WHERE ((" & strDbTable & "Topic.Forum_ID = " & intForumID & " OR " & strDbTable & "Topic.Forum_ID = " & intForumIDMovedToNB & ") AND (" & strDbTable & "Topic.Subject LIKE '" & strSubjectNB & "%' AND "& strDbTable & "Topic.Event_date LIKE '" & strDate & "%')); "