LouiseRose74
New member
- Local time
- Today, 19:03
- Joined
- Dec 16, 2011
- Messages
- 2
Hi
I'm currently upgrading the companies tooling database and was asked to add a button to various forms to point to the file Dir for the tool number selected. I've managed do that, but I would like to hide the button if the folder does not exist. I'm not much good when it comes to VB, got the ideas but not the tallent, see code below
The value im trying to check against is a field called CHHToolNumber
Its not vital. Just trying to save users from clicking the link and wasting time.
Thanks in advance
Louise
I'm currently upgrading the companies tooling database and was asked to add a button to various forms to point to the file Dir for the tool number selected. I've managed do that, but I would like to hide the button if the folder does not exist. I'm not much good when it comes to VB, got the ideas but not the tallent, see code below

The value im trying to check against is a field called CHHToolNumber
Code:
Dim MyDir As String
MyDir = Dir("N:\4. Maintenance\Tooling Information\", vbDirectory)
If MyDir = "me.CHHToolNumber" Then
MsgBox ("Pass")
Else
MsgBox ("Fail")
End If
End Sub
Its not vital. Just trying to save users from clicking the link and wasting time.
Thanks in advance
Louise