Solved

Access VBA Set Struing To %SYSTEMROOT%

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

777 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