Perhaps this will help to explain what I am trying to do. Please read through all of this post as the end might be easier to respond to than each of the individual processes I list:
On my form, I currently have macro buttons that filter my subform for “Complete” and “Incomplete” projects. I am trying to add a few more macro buttons on my main form to filter my subform data as listed below:
VBA Macro process for “Due Between Dates”
In my subform I have a [DueDate] field.
I need to filter my subform source data by a specific date range entered by the user.
The user should be able to enter their desired beginning [DueDate] and ending date [DueDate] values within a pop-up window. Similar to the “Between” function: Between [Enter Beginning Due Date] and [Enter Ending Due Date].
The results will filter all records in the subform, between the dates specified.
VBA Macro process for “Early/On-Time”
In my subform I have a [DueDate] field. I want to find project records that are not past due as well as the records that have not been completed late.
So, I need to filter records where the [DueDate] <= Date() and the [CompletionDate] <> Null
AND
I also need to include any records where the [CompletionDate] < [DueDate].
VBA Macro process for “Late”
In my subform I have a [DueDate] field. I want to find project records that are past due as well as the project records that have not been completed on time.
So, I need to filter records where the Date() > [DueDate] and the [CompletionDate] = Null
AND
I also need to include any records where the [CompletionDate] < [DueDate].
Note: I created separate individual queries to perform these functions and the queries provide the exact data I am looking for. However, I cannot figure out how to have my VBA code change my SouceObject/Master/Child fields to another query source, then use a another macro button to change my SouceObject/Master/Child fields back to their original settings for other form functions to work as coded.
:banghead: Any assistance would be greatly appreciated!!
On my form, I currently have macro buttons that filter my subform for “Complete” and “Incomplete” projects. I am trying to add a few more macro buttons on my main form to filter my subform data as listed below:
VBA Macro process for “Due Between Dates”
In my subform I have a [DueDate] field.
I need to filter my subform source data by a specific date range entered by the user.
The user should be able to enter their desired beginning [DueDate] and ending date [DueDate] values within a pop-up window. Similar to the “Between” function: Between [Enter Beginning Due Date] and [Enter Ending Due Date].
The results will filter all records in the subform, between the dates specified.
VBA Macro process for “Early/On-Time”
In my subform I have a [DueDate] field. I want to find project records that are not past due as well as the records that have not been completed late.
So, I need to filter records where the [DueDate] <= Date() and the [CompletionDate] <> Null
AND
I also need to include any records where the [CompletionDate] < [DueDate].
VBA Macro process for “Late”
In my subform I have a [DueDate] field. I want to find project records that are past due as well as the project records that have not been completed on time.
So, I need to filter records where the Date() > [DueDate] and the [CompletionDate] = Null
AND
I also need to include any records where the [CompletionDate] < [DueDate].
Note: I created separate individual queries to perform these functions and the queries provide the exact data I am looking for. However, I cannot figure out how to have my VBA code change my SouceObject/Master/Child fields to another query source, then use a another macro button to change my SouceObject/Master/Child fields back to their original settings for other form functions to work as coded.
:banghead: Any assistance would be greatly appreciated!!