thanks for the quick reply Bob,
I changed your code slightly
If InStr(1, Me.txtDirName, "import", vbTextCompare) > 0 Then
strValue = "Import"
MsgBox strValue
End If
If InStr(1, Me.txtDirName, "clearance", vbTextCompare) > 0 Then
strValue = "Clearance"
MsgBox strValue
End If
when I click on...