ModuloCalendario.bas

  1. Attribute VB_Name = "ModuloCalendario"
  2. Option Compare Database
  3. Option Explicit
  4.  
  5. Function AbrirCalendario(Optional ByVal NombreControlFecha As String = "")
  6. Dim control As control
  7. If NombreControlFecha <> "" Then
  8. Set control = Screen.ActiveForm.Controls(NombreControlFecha)
  9. Else
  10. Set control = Screen.ActiveControl
  11. End If
  12. If Not control.Locked And control.Enabled Then
  13. control.SetFocus
  14. DoCmd.OpenForm "FormCalendario", WindowMode:=acDialog
  15. Else
  16. MsgBox "El control de fecha '" & control.ControlSource & "' está bloqueado o desactivado", vbExclamation
  17. End If
  18. End Function
  19.  
  20.  

Proinf.net