I have a BegEndDates table with only 1 record in it. It is used to hold a month and a year field so that I don't have to enter it every time I run specific queries. I change those 2 fields once a month. I have a query that finds records from another table called Transactions based on specific criteria. Some of that criteria is based on fields in the Transactions table. I also need to select only records where the date in the transactions table is equal to the month and year in the Beg End Dates table. When I pull both tables into the same query, I can no longer edit data in the datasheet view as I need to. If I simply put 2 parameters into the query and don't call the BegEndDates table, I'm able to make changes to the data as needed, but I'm forced to enter the month and year every time I open the query.
I was hoping to run the query in a macro and hopefully somehow pass the month and year from Beg End Dates into the parameters of my Transactions query so that I can then edit data as needed.
I want to take my query that asks for the month and year to match my transaction date without having to enter the month and year and retrieve it from that other table without that table being in the query. I hope that makes sense. Below, I show an example of my query with the parameters. This is the only way it allows me to make changes to data in the datasheet view. The second screen shot brings in the data, but I can no longer make changes to the data in the datasheet view. Is there a way to pass that data into the query in a macro so that I can run it multiple times a month without entering the parameters each time and still be able to edit data when needed?