Avatar of sheng wee
sheng wee

asked on 

Ms Access locate folder either this or that

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 ?
Microsoft AccessVBA

Avatar of undefined
Last Comment
sheng wee
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of sheng wee
sheng wee

ASKER

Works like a charm ! Thank you so much.
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo