Alright, it randomly works perfectly now. Maybe I just hadn't saved everything the last time or something.
Thanks!
Alright, it randomly works perfectly now. Maybe I just hadn't saved everything the last time or something.
Thanks!
'Randomly works' is not a solution.
Private Sub Command599_Click()
If IsNull(Me.EventID) Then
Application.FollowHyperlink "\\SPARE\SharedDocs\Rob's Valet Docs\Valet Proposals"
Else
Application.FollowHyperlink "\\SPARE\SharedDocs\Rob's Valet Docs\Valet Proposals" & IIf(Dir("\\SPARE\SharedDocs\Rob's Valet Docs\Valet Proposals\" & Me.EventID) = "", "", "\" & Me.EventID)
End If
End Sub
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Aaaand it decided to stop working. Out of nowhere, it now doesn't open up the individual folders. It just opens up the parent folder, regardless of whether the particular event has a subfolder or not.
You tried code suggested in my previous post?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I did. It stopped working, so I changed it to your code, and still same result.
Don't know what to say. Unless EventID is null in every record, the code should work.
Step debug. Refer to link at bottom of my post for debugging guidelines.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I'm doing the step debug according to the instructions in the link at the bottom of your post, but nothing's happening. The code isn't showing any error, so nothing is highlighted yellow. I put the cursor at the beginning of a line and hit F8, and nothing happened. Am I doing something wrong, or is there just technically nothing wrong with the code?
I thought you said it is opening the parent folder? If so, something is happening.
Code is behind button named Command599? Its Click event property is set to [Event Procedure]? You click the button?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
It is opening the parent folder. It's acting as if every event has an ID of null, but that's definitely not the case.
Yes, code is behind button named Command599, which is the correct button to be behind, and the click event property is set to [Event Procedure]. I click the button, and it always opens the parent folder, and has stopped opening Me.EventID.
The code is exactly what you wrote earlier:
Private Sub Command599_Click()
If IsNull(Me.EventID) Then
Application.FollowHyperlink "\\SPARE\SharedDocs\Rob's Valet Docs\Valet Proposals"
Else
Application.FollowHyperlink "\\SPARE\SharedDocs\Rob's Valet Docs\Valet Proposals" & IIf(Dir("\\SPARE\SharedDocs\Rob's Valet Docs\Valet Proposals\" & Me.EventID) = "", "", "\" & Me.EventID)
End If
End Sub
And the subfolders exist?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
The subfolders do exist. Just to make 100% sure, I'm opening up the parent folder, then in Access opening up an event that definitely has a folder with the name being the same as the EventID. Then I click the command button, and the parent folder opens.
Don't know what else I can do.
Debugging shows that only the first FollowHyperlink line is executed? It shows EventID is Null?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Debugging didn't show anything. I went through the step debug, and nothing happened at all.
The command button is just acting as if EventID is null in every case.
If nothing happened then no folder would open. You say the parent folder opens. So which is it - nothing happens or parent folder opens?
Did you verify in debugging that EventID shows as null in the code or does it show the expected value?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
When I tried to do step debug, nothing at all happened. I put the cursor at the beginning of a line, hit F8, and nothing happened.