Solved

Access VBA Set Struing To %SYSTEMROOT%

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

840 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