Hi, I'm new to the forms and this is my first post. I've searched for answers and some where very helpful but not exactly what I'm trying to do. I'm a beginner in access and just know the basics but its all basic logical thinking. Thanks in advance for any help and suggestions.
In short, I have a simple tblData (shown below) with a start and end dates. I have a qryData (SQL shown below) pulling in all the information from the tblData with the filtering on the start and end dates thru a form. The form, frmMain has two text boxes (start date and end date). I also have a Run command button with a macro to open my report rptData. I'm able to filter the data using my frmMain form but I wanted to get the results shown in the expected results section. I've seen this done thru code but could not find any answers on the web.
Below is my access data with one table, one query, one form, and one report
----------------------------------
Table: tblData
----------------------------------
Query: qryData
----------------------------------Code:SELECT tblData.[Name ID], tblData.Name, tblData.[Action ID], tblData.Action, tblData.[Start Date], tblData.[End Date] FROM tblData WHERE (((tblData.[Start Date])>=[Forms]![frmMain]![tbStart]) AND ((tblData.[End Date])<=[Forms]![frmMain]![tbEnd]));
Form: frmMain
I have two text boxes, one is the start date and the second is the end date. I also have a command button "cmdRun" which I'm triggering a macro to open up the report rptData.
----------------------------------
Report: rptData
1. Results using start and end date filters from form frmMain with dates 1/1/2018 to 1/31/2018
2. Unfiltered results showing all query data
3. Expected results I'm trying to achieve using the same start and end dates 1/1/2018 to 1/31/2018 on form frmMain. I expect the code to be more complex here to get these results using the same query data.
----------------------------------
My actual test database with the above information using access 2007
http://www.lowfrz.com/downloads/TestData.zip
----------------------------------
Thanks for the suggestions and helpful information. If anyone knows of any videos to look at that are out there will also be helpful.