Hi to all VB.NET/VB/VBA Developers

Following is the code-block :-

'Query to execute on PE roster
StrQuery = "Unit = '" & _
strDepartment _
& "' and (DateReceived >=" & vntStoreStartDate & " and DateReceived <=" & vntStoreEndDate & ")"

StrQuery = StrQuery & " and (CurrentWorkQueue ='AOM_LogOut_AccountOpen' " _
& "or CurrentWorkQueue ='AOM_LogOut_Maintenance' " _
& "or CurrentWorkQueue ='AOM_LogOut_Funding' " _
& "or CurrentWorkQueue ='AOM_QCInvestigationCase') "

Set objVWRosterQuery = objVWRoster.CreateQuery("", Null, Null, 0, StrQuery, Null, 4)


If objVWRosterQuery.FetchCount() > 0 Then

End If

Now the issue for me is :- in the above VBA code, the flow/execution progresses fine upto the If statement, but it doesnt go inside the IF block.

What I suspect is that the query creation is not taking place properly {refer objVWRoster.CreateQuery}

Pls. advise me how do I go about this. I need to get the execution to proceed/go-inside the IF loop.