Hi,
I have a form with more records lines. For each record I have a button what will open a specific file if exist.
Dim strFoldername As String
strFoldername = Me.Scan
If Dir("M:\Applications Access\Credit autorisations\Documents\" & strFoldername, vbDirectory) = "" Then
MsgBox "Missing document"
Else
FollowHyperlink "M:\Applications Access\Credit autorisations\Documents\" & strFoldername
End If
To verify if the file exist, instate to press the button, I like to indicate on a new field [Ctrl_Doc], the presence of respective file. (Ex: True or False). I tried this, but doesn’t work:
-----------------------------------------------------------------------------
Private Sub Form_Load()
If Len(Dir("M:\Applications Access\Credit autorisations\Documents\" & strFoldername, vbDirectory) >0) Then
[Ctrl_Doc]= True
Else
[Ctrl_Doc]= False
End If
--------------------------------------------------
Can you help me please?
I have a form with more records lines. For each record I have a button what will open a specific file if exist.
Dim strFoldername As String
strFoldername = Me.Scan
If Dir("M:\Applications Access\Credit autorisations\Documents\" & strFoldername, vbDirectory) = "" Then
MsgBox "Missing document"
Else
FollowHyperlink "M:\Applications Access\Credit autorisations\Documents\" & strFoldername
End If
To verify if the file exist, instate to press the button, I like to indicate on a new field [Ctrl_Doc], the presence of respective file. (Ex: True or False). I tried this, but doesn’t work:
-----------------------------------------------------------------------------
Private Sub Form_Load()
If Len(Dir("M:\Applications Access\Credit autorisations\Documents\" & strFoldername, vbDirectory) >0) Then
[Ctrl_Doc]= True
Else
[Ctrl_Doc]= False
End If
--------------------------------------------------
Can you help me please?