G
Guest
I have problems filtering records shown in a form based on what is selected
in the listbox.
It's a little bit complicated but it has to be this way. Form #1 contains
two comboboxes with month and year. Clicking on this form will open Form #2
that contains a listbox that has two columns. When clicking on the listbox I
want to open Form #3 that should filter the records to only show the ones
with the selected month, year, listcolumn1 and listcolumn2. I am able to
filter by month and year from the combobox by having a macro openform where
[Month]=[Forms]![frmMain]![comboMonth] And
[Year]=[Forms]![frmMain]![comboYear].
However, my problem is filtering out the records to only show from the two
columns in the listbox. Form #3 has two textboxes that will be needed to be
compared to the listbox and show only the selected records. I tried this code
in the macro event where, which I get an error message "undefined function
[listbox].[column]:
[Expr1] = [Forms]![frmName]![listbox]. Column(0) AND
[Expr2] = [Forms]![frmName]![listbox]. Column(1)
What should I do to make it work.
in the listbox.
It's a little bit complicated but it has to be this way. Form #1 contains
two comboboxes with month and year. Clicking on this form will open Form #2
that contains a listbox that has two columns. When clicking on the listbox I
want to open Form #3 that should filter the records to only show the ones
with the selected month, year, listcolumn1 and listcolumn2. I am able to
filter by month and year from the combobox by having a macro openform where
[Month]=[Forms]![frmMain]![comboMonth] And
[Year]=[Forms]![frmMain]![comboYear].
However, my problem is filtering out the records to only show from the two
columns in the listbox. Form #3 has two textboxes that will be needed to be
compared to the listbox and show only the selected records. I tried this code
in the macro event where, which I get an error message "undefined function
[listbox].[column]:
[Expr1] = [Forms]![frmName]![listbox]. Column(0) AND
[Expr2] = [Forms]![frmName]![listbox]. Column(1)
What should I do to make it work.