Hi Folks,
I have a search audit trail form, all the fields seem to be working perfectly to search for except for dates.
I have a query which is run when a button is pressed and uses the following code in each of the criteria fields in the query:
For Username:
Code:
Like "*" & [Forms]![Search Audit Trail]![Username] & "*"
To find the source table:
Code:
Like "*" & [Forms]![Search Audit Trail]![SourceTable] & "*"
And so on
I would like to know what criteria I would have to enter in order for me to be able to search between two fields whilst still allowing the fields to be blank if they weren't entered. I have tried:
Code:
Between "*" & [Forms]![Search Audit Trail]![DateFrom] and [Forms]![Search Audit Trail]![DateTo] & "*"
But this doesn't seem to be working, any help would be greatly appreciated.