Solved

Access VBA Set Struing To %SYSTEMROOT%

Posted on 2016-10-02
3
33 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

943 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

6 Experts available now in Live!

Get 1:1 Help Now