Solved

Access VBA Set Struing To %SYSTEMROOT%

Posted on 2016-10-02
3
27 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
3 Comments
 
LVL 75

Assisted Solution

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

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

mx
0
 
LVL 39

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 up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now