Ver Mensaje Individual
  #4 (permalink)  
Antiguo 18/09/2008, 02:23
Avatar de Taribo007
Taribo007
 
Fecha de Ingreso: agosto-2007
Mensajes: 1.338
Antigüedad: 16 años, 8 meses
Puntos: 18
Respuesta: [access] ver diseño de un formulario

Aqui estan las dos funciones para habilitar y deshabilitar la tecla shift:

'************************************************* ************
Option Compare Database
Option Explicit
Function ap_DisableShift()

On Error GoTo errDisableShift

Dim db As Database
Dim prop As Property
Const conPropNotFound = 3270

Set db = CurrentDb()

db.Properties("AllowByPassKey") = False

Exit Function

errDisableShift:

If Err = conPropNotFound Then
Set prop = db.CreateProperty("AllowByPassKey", _
dbBoolean, False)
db.Properties.Append prop
Resume Next
Else
MsgBox Err.Number & " / " & Err.Description, vbInformation + vbOKOnly, "A V I S O"
Exit Function
End If

End Function
'================================================= ===========
Function ap_EnableShift()

On Error GoTo errEnableShift

Dim db As Database
Dim prop As Property
Const conPropNotFound = 3270

Set db = CurrentDb()
db.Properties("AllowByPassKey") = True

Exit Function

errEnableShift:

If Err = conPropNotFound Then
Set prop = db.CreateProperty("AllowByPassKey", _
dbBoolean, True)
db.Properties.Append prop
Resume Next
Else
MsgBox Err.Number & " / " & Err.Description, vbInformation + vbOKOnly, "A V I S O"
Exit Function
End If

End Function
'*******************************************+
Estoy buscando un ejemplo que tengo de un maquina del access (el buho), en el que tienes un botoncito para buscar la bd que quieres habilitar o deshabilitar esta funcion.

Un saludo