I have a report query (qry_Data) that contains a field called "StartDate". I have a report form (frm_Data) where I want to put 2 text boxes (Text101 and Text102). I want to create the Query Criteria code for the StartDate so that it will look for start dates between the dates listed in Text101 and Text102 and if the user does not put anything into Text101 or Text102 it just searches for all dates.
I tried to use the code below
However, Access modified my code to this
And it does not work. Any suggestions on how to do this?
Thanks,
Jim
I tried to use the code below
Code:
Between ([Forms]![frm_Data]![text101] Or Like [Forms]![frm_Data]![text101] & "*") and ([Forms]![frm_Data]![text102] Or Like [Forms]![frm_Data]![text102] & "*")
However, Access modified my code to this
Code:
Between (([tbl_Data].[Start])=[Forms]![frm_Data]![text101] Or ([tbl_Data].[Start]) Like [Forms]![frm_Data]![text101] & "*") And (([tbl_Data].[Start])=[Forms]![frm_Data]![text102] Or ([tbl_Data].[Start]) Like [Forms]![frm_Data]![text102] & "*")
And it does not work. Any suggestions on how to do this?
Thanks,
Jim