I have a 2 part question I am hoping to get some help with. I should also add that I'm not very well versed in queries and I mostly stick to select queries, so I may need specific direction if another type is needed. I am building a database that imports a report of accounts that are missing documentation. They open the form and work each account, and then either pend it or mark it complete and it leaves that queue. The form is based on a query that pulls only accounts that have not been marked pended or completed.
First question:
They would like the ability to filter the accounts that come up in the form by 3 different comboboxes, in case they want to work certain scenarios.
Comboboxes are for:
Document missing (cboException)
Days aged (cboAged)
Remaining balance (cboBalance)
Document missing is easy, I just added criteria in my original query to refer to Forms!frmMain!cboException. Days aged and balance are tripping me up because they want a range in the combobox. I put the ranges into tables for both with a start and end number (Days aged: 150 - 330, 331 - 510, 511 - 690, etc. Balance: $0 - $5,000, $5,001 - 10,000, 10,001 - 15,000, etc.) and then I concatenated the fields in the combo to include the dash between.
How do I set up the query to pull accounts within the range selected in the combobox? I tried to refer to the 2 columns in the criteria with start and end number, like Between Forms!frmMain!cboAged.Column(0) and Forms!frmMain!cboAged.Column(1), but it doesn't seem to work. The last number in the range is also just a greater than, like for balance: $100,000 +, so there is a start number but not an end.
My second question is, can the query be set up in a way that they can select any of the 3 comboboxes in any combination and it will filter by whatever is selected? So they could say "I want to see accounts where contract is missing, it is older than 300 days, and the balance is over $10,000." Or they could just pick one and the others don't filter but show all.
Any help with this would be greatly appreciated!
First question:
They would like the ability to filter the accounts that come up in the form by 3 different comboboxes, in case they want to work certain scenarios.
Comboboxes are for:
Document missing (cboException)
Days aged (cboAged)
Remaining balance (cboBalance)
Document missing is easy, I just added criteria in my original query to refer to Forms!frmMain!cboException. Days aged and balance are tripping me up because they want a range in the combobox. I put the ranges into tables for both with a start and end number (Days aged: 150 - 330, 331 - 510, 511 - 690, etc. Balance: $0 - $5,000, $5,001 - 10,000, 10,001 - 15,000, etc.) and then I concatenated the fields in the combo to include the dash between.
How do I set up the query to pull accounts within the range selected in the combobox? I tried to refer to the 2 columns in the criteria with start and end number, like Between Forms!frmMain!cboAged.Column(0) and Forms!frmMain!cboAged.Column(1), but it doesn't seem to work. The last number in the range is also just a greater than, like for balance: $100,000 +, so there is a start number but not an end.
My second question is, can the query be set up in a way that they can select any of the 3 comboboxes in any combination and it will filter by whatever is selected? So they could say "I want to see accounts where contract is missing, it is older than 300 days, and the balance is over $10,000." Or they could just pick one and the others don't filter but show all.
Any help with this would be greatly appreciated!
Last edited: