I am looking for assistance with a query which will return all records from a table with a start time within a certain range. All attempts thus far have resulted in either all records being excluded, or an error message stating the expression is too complex.
I am attempting to use Access to pull all of the work activities from my employers scheduling database, then using individual queries select the activities scheduled to start between 6am and 6pm on a given day or 6pm one day and 6am the following day, for each day of the week. I have query criteria which will successfully return all activities on a given date, but cannot seem to develop a working select criteria to refine the results by time period.
The applicable field, EST (early start time), appears to be formatted as Short Time (I get this from the properties window for the column after adding this field to the query selections). I initially attempted to set my selection criteria to
Between #6:00:00# And #17:59:00#
but received an error message "The expression is typed incorrectly or is too complex to be evaluated". Changing the selection criteria to
>#6:00:00# And <#17:59:00#
returned the same error. In frustration I have tried simply activities after 6AM with
>#6:00:00#
with no improvement. This occurs regardless whether I use the field directly from the table or try to ensure it is in the correct format using TimeValue([EST]). Finally I have an additional field in the same table which converts the time to a simple integer value from 1 through 23, and even attempting to determine whether the value of the number in this field is
>6
has continued to return the same error. This seems like it should be a very simple solution but I am new to Access and trying to teach myself and the answer is escaping me. I appreciate any insights anyone can provide.
Ehron