jt643
Technical User
- Jun 17, 2003
- 144
I posted a similar thread that I ended up thinking I found the solution to. (thread705-1121179)
However, the error is happening again. When a user clicks a button that runs either a function or a macro that references the 'Environ' expression, I get the following error:
Run-Time Error '3085'
Undefined Function 'ENVIRON' in Expression
Since my last post, here is some additional information:
1. It is only happening on our Remote Sessions (within Terminal Server).
2. The same databse/code that gets copied to a local machine works great.
3. Upon researching various Microsoft articles, I have found that an Access Database's Jet can get corrupt if it is not properly shut down. Our computer that hosts the database users access via Remote Desktop has lost power a couple times - which could have corrupted the database.
I have usually been able to resolve this in the past by a simple 'Compact and Repair Database'. If that didn't work, I would then run Office's 'Detect and Repair'.
Recently, neither of these have fixed it.
My VB which is causing the issue is:
Dim UserID As String
UserID = Environ("USERNAME")
As I have mentioned, syntax does not appear to be the issue since the code is working on local machines. It just seems like something within the VB for Applications on the Remote machine has become corrupt.
I do not want to reinstall Office as that will affect my remote users.
Has anyone had any experience with this or have any suggestions?
I would be grateful.
However, the error is happening again. When a user clicks a button that runs either a function or a macro that references the 'Environ' expression, I get the following error:
Run-Time Error '3085'
Undefined Function 'ENVIRON' in Expression
Since my last post, here is some additional information:
1. It is only happening on our Remote Sessions (within Terminal Server).
2. The same databse/code that gets copied to a local machine works great.
3. Upon researching various Microsoft articles, I have found that an Access Database's Jet can get corrupt if it is not properly shut down. Our computer that hosts the database users access via Remote Desktop has lost power a couple times - which could have corrupted the database.
I have usually been able to resolve this in the past by a simple 'Compact and Repair Database'. If that didn't work, I would then run Office's 'Detect and Repair'.
Recently, neither of these have fixed it.
My VB which is causing the issue is:
Dim UserID As String
UserID = Environ("USERNAME")
As I have mentioned, syntax does not appear to be the issue since the code is working on local machines. It just seems like something within the VB for Applications on the Remote machine has become corrupt.
I do not want to reinstall Office as that will affect my remote users.
Has anyone had any experience with this or have any suggestions?
I would be grateful.