We help IT Professionals succeed at work.

Ms Access locate folder either this or that

sheng wee
sheng wee asked
on
80 Views
Last Modified: 2017-04-03
Hi All,
I will be having 3 buttons ( 1st to create folder from Ms access, 2nd Rename folder, 3rd open the folder)

1st button =
Private Sub Command58_Click()
filename = Ref_Number.Value
MkDir "c:\SCSWA WORK PROJECTS\AccessDatabase\" & filename
MsgBox ("File has been created successfully")

End Sub

2nd button =
Private Sub Command77_Click()

Dim oldpathname As String
Dim newpathname As String

filename = Ref_Number.Value
scname = SC.Value

    oldpathname = "c:\SCSWA WORK PROJECTS\AccessDatabase\" & filename
    newpathname = "c:\SCSWA WORK PROJECTS\AccessDatabase\" & scname & "_" & filename
   
    Name oldpathname As newpathname
   
End Sub

3rd button=
Application.FollowHyperlink "C:\SCSWA WORK PROJECTS\AccessDatabase\" & Me.Ref_Number.Value

How can I find either that the old folder or the renamed folder ?
Comment
Watch Question

Software Tead Lead / Business Analyst / System Analyst / Data Engineer / Applications Consultant
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Works like a charm ! Thank you so much.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.