Solved

Access VBA Set Struing To %SYSTEMROOT%

Posted on 2016-10-02
3
54 Views
Last Modified: 2016-10-02
Hi Experts,

How do I set the value of %SYSTEMROOT% to a VBA Variable?

I want WRK_APP_STD_INSTALL_DRIVE_001  to be the value of  %SYSTEMROOT%

The following code produces the Error 'Syntax Error'.

Dim WRK_APP_STD_INSTALL_DRIVE_001 As String
WRK_APP_STD_INSTALL_DRIVE_001 = %SYSTEMROOT%

Thanks,
Bob C.
0
Comment
Question by:Bob_Collison
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 200 total points
ID: 41825522
The entire story his here (and more)

http://access.mvps.org/access/api/api0054.htm

mx
0
 
LVL 40

Accepted Solution

by:
als315 earned 300 total points
ID: 41825535
Environ("SystemRoot")
0
 

Author Closing Comment

by:Bob_Collison
ID: 41825584
Hi Experts,

Thanks for both of the solutions.

Bob C.
0

Featured Post

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question