Denise2020
Member
- Local time
- Today, 09:01
- Joined
- Mar 31, 2020
- Messages
- 82
Hello again wonderful people!
I have a form that contains a combobox which I use to filter records based on a field. There is a button which creates a report based on the "results" of that filter which makes a calculation of total time. I have two problems just now:
1) I want a time report for ALL records, thereby not filtering, but making no choice in the combobox results in a report which shows zero records.
2) I cannot figure out a way to put other filters on the form and generate the report. Just now, making a selection in the combobox selects ALL records with that selection. I would like to be able to pick all records from that selection, from a specific YEAR, without the user having to go into the query to modify it, as they are all unfamiliar with Access.
My (probably unsightly) implementation is currently this way:
a query to generate the report with the field condition of:
Like [Forms]![formname]![cboName]
a combobox on the form with the row source:
SELECT DISTINCT qryName.fieldname
FROM qryName
ORDER BY qryName.fieldname
and a button on the form with the after update event
Me.Filter = "[fieldname] = " & Chr(34) & Me.cboName & Chr(34)
Me.FilterOn = True
I hope this makes sense. Thanks in advance!
I have a form that contains a combobox which I use to filter records based on a field. There is a button which creates a report based on the "results" of that filter which makes a calculation of total time. I have two problems just now:
1) I want a time report for ALL records, thereby not filtering, but making no choice in the combobox results in a report which shows zero records.
2) I cannot figure out a way to put other filters on the form and generate the report. Just now, making a selection in the combobox selects ALL records with that selection. I would like to be able to pick all records from that selection, from a specific YEAR, without the user having to go into the query to modify it, as they are all unfamiliar with Access.
My (probably unsightly) implementation is currently this way:
a query to generate the report with the field condition of:
Like [Forms]![formname]![cboName]
a combobox on the form with the row source:
SELECT DISTINCT qryName.fieldname
FROM qryName
ORDER BY qryName.fieldname
and a button on the form with the after update event
Me.Filter = "[fieldname] = " & Chr(34) & Me.cboName & Chr(34)
Me.FilterOn = True
I hope this makes sense. Thanks in advance!