Private Sub Etiqueta100_Click()
Dim frm As Form_Fecha_Personalizada 'Need Form_ before the name of the pop up
Dim strFilter As String
Dim strArgs As String
DoCmd.OpenForm "Fecha_Personalizada", , , , , acDialog, "04-A Gastos;[Fecha de la Factura]"
'code is stopped until the dialog is hidden or closed
If CurrentProject.AllForms("Fecha_Personalizada").IsLoaded Then
'If hidden it is loaded
'If the user canceled out then you do not want to do anything anyways
Set frm = Forms("Fecha_Personalizada")
strFilter = frm.ElFiltro 'Public properties
strArgs = frm.MiArgumento 'Public properties
DoCmd.Close acForm, frm.Name
DoCmd.OpenReport "04-A Gastos", acViewPreview, , "[Fecha de la Factura] " & strFilter, , strArgs
End If
End Sub