T
Tdahlman
I have a Select Case that runs when I click a Command Button in my form.
When I click the button it Opens a folder on my network.
Here is my code.
Private Sub Project_Folder_Click()
Select Case Me.Project_Number
Case Is < 591
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\" & Me.Project_Number
Case 591 To 999
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\591 - 999\" &
Me.Project_Number
Case 1001 To 1500
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\1001 - 1500\" &
Me.Project_Number
Case 1501 To 2000
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\1501 - 2000\" &
Me.Project_Number
Case 2001 To 2500
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\2001 - 2500\" &
Me.Project_Number
Case 2501 To 3000
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\2501 - 3000\" &
Me.Project_Number
Case 3001 To 3500
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\3001 - 3500\" &
Me.Project_Number
Case 3501 To 4000
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\3501 - 4000\" &
Me.Project_Number
Case 4001 To 4500
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\4001 - 4500\" &
Me.Project_Number
End Select
Me.Project_Folder.HyperlinkAddress = Me.Project_Folder_Hyperlink
End Sub
What I want to happen is if the Folder doesn't exist then I want it to
display a message that says "Project Folder does not exist. Please create the
necessary folder"
Then I want it to automatically open H:\New Drive\591 - 999 ... Or 1001 -
1500, etc. depending on which Case is true.
Thank you in advance for your help
Travis.
When I click the button it Opens a folder on my network.
Here is my code.
Private Sub Project_Folder_Click()
Select Case Me.Project_Number
Case Is < 591
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\" & Me.Project_Number
Case 591 To 999
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\591 - 999\" &
Me.Project_Number
Case 1001 To 1500
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\1001 - 1500\" &
Me.Project_Number
Case 1501 To 2000
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\1501 - 2000\" &
Me.Project_Number
Case 2001 To 2500
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\2001 - 2500\" &
Me.Project_Number
Case 2501 To 3000
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\2501 - 3000\" &
Me.Project_Number
Case 3001 To 3500
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\3001 - 3500\" &
Me.Project_Number
Case 3501 To 4000
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\3501 - 4000\" &
Me.Project_Number
Case 4001 To 4500
Me.Project_Folder_Hyperlink.Value = "H:\New Drive\4001 - 4500\" &
Me.Project_Number
End Select
Me.Project_Folder.HyperlinkAddress = Me.Project_Folder_Hyperlink
End Sub
What I want to happen is if the Folder doesn't exist then I want it to
display a message that says "Project Folder does not exist. Please create the
necessary folder"
Then I want it to automatically open H:\New Drive\591 - 999 ... Or 1001 -
1500, etc. depending on which Case is true.
Thank you in advance for your help
Travis.