A
António Castro Caldas
Hi,
I'm trying to open a Report on an Open event, through a button in a form.
I'm passing a Where Condition, however, the Report seems to ignore it... It
simply shows all the records existing in the table... The record can by
called through 2 diferent buttons, one of them with no filter (hence the
Condicao Variable):
Private Sub MonthlyReports_Click()
Dim Condicao: Condicao = ""
If Not IsNull(Forms![Propostas]![ClientID]) Then
Condicao = "[ClientID]=" & Forms![Propostas]![ClientID]
End If
DoCmd.OpenReport "FollowUpPropostas", acPreview, Condicao, ,
acWindowNormal
End Sub
Anyone?
Thanks
Antonio
I'm trying to open a Report on an Open event, through a button in a form.
I'm passing a Where Condition, however, the Report seems to ignore it... It
simply shows all the records existing in the table... The record can by
called through 2 diferent buttons, one of them with no filter (hence the
Condicao Variable):
Private Sub MonthlyReports_Click()
Dim Condicao: Condicao = ""
If Not IsNull(Forms![Propostas]![ClientID]) Then
Condicao = "[ClientID]=" & Forms![Propostas]![ClientID]
End If
DoCmd.OpenReport "FollowUpPropostas", acPreview, Condicao, ,
acWindowNormal
End Sub
Anyone?
Thanks
Antonio