A family of Microsoft relational database management systems designed for ease of use.
Alternative for DIR() function in SQL statement
Since Access 2010 I'm having trouble with the DIR() function in queries. The Sandbox mode disables this command -also the much used ENVIRON() function- by default.
For all clients I've changed the sandbox mode setting from 3 to 2. Recently a windows update or my system administrator set this setting back to 3 again for all clients.
I got a number of databases that use functions that will be disabled by this setting, and I'm getting a lot of complaints from 30+ clients.
In VBA there are other way's to check if a file exists, but in quey sql statements, I only know the DIR() function.
Example: (don't mind typing errors as I don't have the actual statement at hand)
SELECT.... [FIELD1] as IIF(DIR([FileName])="";null;"[FileName] " ) ... FROM...
"Is there another way to check file existence within a SQL command"?
OR
"is there a way -in VBA- I can set the registry setting for sandbox mode to 2"?
Note: Clients are running XP-32bit and win7-32bit and win7-64bit
Any help will be much appreciated!
Microsoft 365 and Office | Access | For home | Windows
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.