I am trying to make a checkbox on a form check (be true) if a certain folder on the C drive of the user's computer exists and if any jpg files are in that folder. The following is my code of the on current event of the form. But it is not checking the checkbox when jpg files do exists in the folder. What have I done wrong?
If Len(Dir("C:\Company\General Shared Files\PRINTS\" & Me.txtPartN & "\*.jpg")) = 0 Then
Me.chkprints = False
Else
Me.chkprints = True
End If
--Steve
If Len(Dir("C:\Company\General Shared Files\PRINTS\" & Me.txtPartN & "\*.jpg")) = 0 Then
Me.chkprints = False
Else
Me.chkprints = True
End If
--Steve