If DCount("FileID", "qryMIR", "[MIRSeq] = " & MIRSeq & _
" and [MIRType] =""" & MIRType & """" & _
" and [TicketNumber]=""" & tkt & """")
DCount("FileID", "qryVLD", "[MIRType]="A"" and [TicketNumber]=""" & tkt & """")
DCount("FileID", "qryMIR", "[MIRSeq]=" & MIRSeq & " and [MIRType]=""A"" and [TicketNumber]=""" & tkt & """")
DCount("FileID", "qryMIR", " [TicketNumber]=""" & tkt & """" & _
" and ( [MIRSeq]=" & MIRSeq & " " & _
" or [MIRType]=""A"" ) ")
DCount("FileID", "qryVLD", "([MIRType]=""A Or H"") and ([TicketNumber]=""" & tkt & """)")
If DCount("FileID", "qryVLD", "([MIRType]=""A"" OR [MIRType] = ""H"") and ([TicketNumber]=""" & tkt & """)") Then 'validate MIR Sequence number and Ticketnumber to avoid Duplication
txtMIRActivity.Value = srcfile & " " & "'" & MIRType & "'" & " " & tkt & " " & PNR & " " & "DUPLICATE DATA" & vbNewLine & txtMIRActivity.Value
Print #2, srcfile & " " & "'" & MIRType & "'" & " " & tkt & " " & PNR & " " & "DUPLICATE DATA"
Close #1
'Name SrcFolder & srcfile As dupfolder & srcfile 'Move Duplicate file
GoTo NextFile
'DCount("FileID", "qryVLD", "([MIRType]=""A or H"") and ([TicketNumber]=""" & tkt & """)")
ElseIf DCount("FileID", "qryMIR", "[MIRSeq]=" & MIRSeq & " and [TicketNumber]=""" & tkt & """)") Then ' validate data for duplicates with MIRType and TicketNumber
txtMIRActivity.Value = srcfile & " " & MIRSeq & " " & tkt & " " & PNR & " " & "DUPLICATE MIR FILE" & vbNewLine & txtMIRActivity.Value
Print #2, srcfile & " " & MIRSeq & " " & tkt & " " & PNR & " " & "DUPLICATE MIR FILE"
Close #1
'Name SrcFolder & srcfile As dupfolder & srcfile 'Move Duplicate file
GoTo NextFile
End If
If DCount("FileID", "qryVLD", "([MIRType] = ""A"" " & _
" OR [MIRType] = ""H"") " & _
and ([TicketNumber]=""" & tkt & """)") [COLOR="Red"]> 0[/COLOR] Then
DCount("FileID", "qryVLD", "([MIRType]=""A"" OR [MIRType] = ""H"")
and ([mirtype]=""" & MIRType & """
and [TicketNumber]=""" & tkt & """)")