Conditional Record Source

  • Thread starter Thread starter Kathy Webster
  • Start date Start date
K

Kathy Webster

Can you use a conditional statement in the Record Source property of a
report?

I tried this but it didn't like it:

IIf([forms]![ExcelExport]![100k]=False,
q_RemittanceReport_99k,q_RemittanceReport_100k
 
Can you use a conditional statement in the Record Source property of a
report?

I tried this but it didn't like it:

IIf([forms]![ExcelExport]![100k]=False,
q_RemittanceReport_99k,q_RemittanceReport_100k


Leave the recordsource property empty.
Code the Report's Open event:

If(forms![ExcelExport]![100k]= False Then
Me.Recordsource ="q_RemittanceReport_99k"
Else
Me.Recordsource = "q_RemittanceReport_100k"
End If
 
Perfect. Thank you.
But you will see my new post to queries, which is the true root of the
problem.
I don't even WANT 2 optional queries. I'd rather have 1 query with
conditional parameters, but I was having trouble with that, and it prompted
this note.

fredg said:
Can you use a conditional statement in the Record Source property of a
report?

I tried this but it didn't like it:

IIf([forms]![ExcelExport]![100k]=False,
q_RemittanceReport_99k,q_RemittanceReport_100k


Leave the recordsource property empty.
Code the Report's Open event:

If(forms![ExcelExport]![100k]= False Then
Me.Recordsource ="q_RemittanceReport_99k"
Else
Me.Recordsource = "q_RemittanceReport_100k"
End If
 
Back
Top