We have users on both XP/Access 2003 and Win7/Access 2010. I want to use the .istrusted to show a form to tell the user to select the ENABLE macro on the Security Bar.
But .istrusted is not valid for the ACCESS 2003 users and the AUTOEXEC macro has to work for both users. I tried using a function in VBA to get the Access Version number - GetAccessVersion(), but in ACCESS 2010 it won't run the VBA code until after you ENABLE macro on the Security Bar.
I've tried to use the following in the MACRO CONDITION column
Dir("C:\Program Files\Microsoft Office\Office14\MSACCESS.EXE")=""
as the first line in the AUTOEXEC macro and it works just fine for the ACCESS 2003 users. If the Office14 folder isn't there, I assume you're an Access 2003 user and skip the .istrusted logic for the ACCESS 2010 users. It does NOT work for the Access 2010 users.
Likewise, I tried to use this in the MACRO CONDITION column
SysCmd(acSysCmdAccessVer)=11 with thet same results as the Dir Function.
I need a MACRO CONDITION that will work in the AUTOEXEC MACRO for Access 2003 and 2010 users that will skip the .istrusted logic (enable macro form) if the users is running XP/Access 2003, or not skip the .istrusted logic if the users is running windows7/Access 2010. The database is always ACCESS 2003 .mdb file.
Please help.