D
DOYLE60
I have a listbox on a form that filters a report. When nothing is chosen, the
code interprets this as all chosen.
I have a textbox on a report that lists the selections chosen:
=enumrecord("PrintDialogInventoryFranchiseLBqry2")
So if nothing is chosen (meaning all is actually chosen), the above will in
fact list all.
This all works fine.
But I now want to simply print in that textbox on the report the word "All"
when nothing is chosen in the list box (meaning all chosen, of course). Right
now it would print all the items in the list box.
I tried this formula:
=IIf([Forms]![InventoryDialogPrintfrm]![FranchiseChosen] Is
Null,"All",enumrecord("PrintDialogInventoryFranchiseLBqry2"))
But that doesn't work.
I know I should use some sort of line like:
If Len(Criteria) = 0 Then
But don't know how I should put this all together.
The form is: InventoryDialogPrintfrm
The List box is: FranchiseChosen
The query that contains the chosen list box items is:
PrintDialogInventoryFranchiseLBqry2
Thanks so much,
Matt
code interprets this as all chosen.
I have a textbox on a report that lists the selections chosen:
=enumrecord("PrintDialogInventoryFranchiseLBqry2")
So if nothing is chosen (meaning all is actually chosen), the above will in
fact list all.
This all works fine.
But I now want to simply print in that textbox on the report the word "All"
when nothing is chosen in the list box (meaning all chosen, of course). Right
now it would print all the items in the list box.
I tried this formula:
=IIf([Forms]![InventoryDialogPrintfrm]![FranchiseChosen] Is
Null,"All",enumrecord("PrintDialogInventoryFranchiseLBqry2"))
But that doesn't work.
I know I should use some sort of line like:
If Len(Criteria) = 0 Then
But don't know how I should put this all together.
The form is: InventoryDialogPrintfrm
The List box is: FranchiseChosen
The query that contains the chosen list box items is:
PrintDialogInventoryFranchiseLBqry2
Thanks so much,
Matt