Others

Filter Microsoft Access Timesheets by Date Range and Billing Code

Steve KSteve K Nov 20, 2026 869 views

Question details

Filter timesheet records by a start date, end date, and billing code in an Access form.

Filter Microsoft Access Timesheets by Date Range and Billing Code
Product
Microsoft Access and SQL Server
Device & OS
not provided
Scenario
An Access database uses a linked SQL Server table to display timesheet records on a form or report.
Observed behavior
The user wants to display only records matching the selected date range and billing code.
Before you start

Confirm that the SQL Server table is linked in Access and identify the names and data types of its date and billing-code fields. The example uses tsdate and tsbcode; replace these and the table name if yours differ.

Solution 1Recommended

Use an Access parameter query to filter the timesheet form

Use this method when users need to enter a date range and select a billing code before opening matching records.

1
Create the criteria form

In Access, select Create > Form Design and save the unbound form as YourForm. Add two text boxes named FromDate and ToDate, then add a combo box named cboCode.

2
Configure the billing-code list

Select cboCode and open its Property Sheet. Set its Row Source to a table or query containing billing codes, and make sure its Bound Column returns a value compatible with the tsbcode field.

3
Create the filter query

Select Create > Query Design, switch to SQL View, and enter: SELECT * FROM [YourLinkedTable] WHERE [tsdate] >= [Forms]![YourForm]![FromDate] AND [tsdate] < DateAdd("d", 1, [Forms]![YourForm]![ToDate]) AND [tsbcode] = [Forms]![YourForm]![cboCode]; Replace YourLinkedTable with the linked table name and save the query.

4
Connect the results form or report

Open the results form or report in Design View and set its Record Source property to the saved query. On YourForm, add a button with the command button wizard to open that form or report.

5
Run the filter

Open YourForm, enter both dates, select a billing code, and click the button. Keep YourForm open so the query can read its controls.

End-date times are included: The query uses a value earlier than the day after ToDate, so records with a time component on the selected end date are included.
Free Microsoft Office alternative

Review exported timesheets in WPS Spreadsheets

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface. Export Access results to Excel, then open them in WPS Spreadsheets to review and filter the data; WPS does not replace the Access parameter query or form.

Filter exported timesheet rows by date and billing codeOpen and edit Microsoft Excel XLSX and XLS filesWork in a familiar spreadsheet interfaceMove exported spreadsheet data into WPS without rebuilding the Access form
microsoft office alternative - wps office

Frequently Asked Questions

Why does Access ask me to enter a parameter value?

Check that YourForm is open and that the form and control names in SQL View exactly match the names in the form's Property Sheet. Also check the linked table and field names.

Does the date range include records from the end date?

Yes. The query uses tsdate < DateAdd("d", 1, ToDate), which includes records up to the end of the selected date even when tsdate contains a time.

Why are no records returned for the selected billing code?

Check cboCode's Row Source and Bound Column in the Property Sheet. The bound value must match the value and data type stored in tsbcode; also confirm that both dates and the selected code match existing records.

Can I open a report instead of a form with the filtered results?

Yes. Set the report's Record Source to the saved query, then use the command button wizard on YourForm to add a button that opens the report.