RE:Necesito Desactivar el macro de seguridad
create un modulo y prueba esto... Cuando abras el formulario principal llama a la funcion MsAccessSecurity con el parametro low y me dices si te funciona...
Option Compare Database
Enum SecurityLevel
Low = 1
Medium
High
End Enum
Private Declare Function RegOpenKey Lib "advapi32.dll" _
Alias "RegOpenKeyA" _
(ByVal hKey As Long, _
ByVal lpSubKey As String, _
phkResult As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32.dll" _
(ByVal hKey As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" _
Alias "RegSetValueExA" _
(ByVal hKey As Long, _
ByVal lpValueName As String, _
ByVal Reserved As Long, _
ByVal dwType As Long, _
lpData As Any, _
ByVal cbData As Long) As Long
Private Const HKEY_CURRENT_USER = &H80000001
Private Const ERROR_SUCCESS = 0&
Private Const REG_DWORD = &H4
Function MsAccessSecurity(Level As SecurityLevel) As Boolean
Dim sKey As String
Dim hKey As Long
If Level < Low Or Level > High Then Exit Function
sKey = "Software\Microsoft\Office\11.0\Access\Security"
If RegOpenKey(HKEY_CURRENT_USER, sKey, hKey) = ERROR_SUCCESS Then
If RegSetValueEx( _
hKey, _
"Level", _
0&, _
REG_DWORD, _
Level, _
Len(Level)) = ERROR_SUCCESS Then
MsAccessSecurity = True
End If
Call RegCloseKey(hKey)
End If
End Function