A
Antonio
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 be
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
Is this something to do with the SQL in the Report? It's quite simple, it's
just a Select to have the fields I want in the report...
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 be
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
Is this something to do with the SQL in the Report? It's quite simple, it's
just a Select to have the fields I want in the report...
Anyone?
Thanks
Antonio