I am needing help with the code to select different queries based on different conditions.
The database is to be set up so that I can pull studies at different time points based on if they are under long term, accelerated or stressed conditions. When this condition is selected there are only certain time points which are to be run,
example.....
Long term: 3,6,9,12,24,36,48 and 60 months.
Accelerated: 3,6,9 and 12 months.
As you can see I have the dates calculated for all of the weeks and months that the sample could be pulled at, Inventory Transactions Table. And I am able to generate throught the Pull Dates Form a list of only the records to be pulled under Long Term conditions. I would like to have the form set up so that when I choose the Accelerated condition that it would pull from another Query like the Pull Dates Long Term, but only have the Accelerated time points listed.
My code to select the query is like this.
Private Sub Combo0_Click()
DoCmd.OpenQuery "Pull Dates Query Long Term"
End Sub
Can I add to it to select a different query with accelerated time points when that field is selected?
Also, while I have your attention. Is there a way to limit which sample dates are calculated, maybe by specifying criteria in the Inventory Transactions Pull Dates Query?
Example.......
The samples either have a monthly or weekly pull date, as shown in the Inventory Transaction table. The issue is that for Long Term and Accelerated conditions I have monthly pull dates and for Stressed conditions I only have weekly pull dates. I have no need to calculate pull dates by month for the studies that are completed on a weekly basis. I would like to use the combo box , Samplling Interval, in the Inventory Transaction table to be able to choose by month or week and the corresponding pull dates calculated for the particular conditions.
If you can help with this also that would be great, If not I can get by on what I have created so far.
Thanks
The database is to be set up so that I can pull studies at different time points based on if they are under long term, accelerated or stressed conditions. When this condition is selected there are only certain time points which are to be run,
example.....
Long term: 3,6,9,12,24,36,48 and 60 months.
Accelerated: 3,6,9 and 12 months.
As you can see I have the dates calculated for all of the weeks and months that the sample could be pulled at, Inventory Transactions Table. And I am able to generate throught the Pull Dates Form a list of only the records to be pulled under Long Term conditions. I would like to have the form set up so that when I choose the Accelerated condition that it would pull from another Query like the Pull Dates Long Term, but only have the Accelerated time points listed.
My code to select the query is like this.
Private Sub Combo0_Click()
DoCmd.OpenQuery "Pull Dates Query Long Term"
End Sub
Can I add to it to select a different query with accelerated time points when that field is selected?
Also, while I have your attention. Is there a way to limit which sample dates are calculated, maybe by specifying criteria in the Inventory Transactions Pull Dates Query?
Example.......
The samples either have a monthly or weekly pull date, as shown in the Inventory Transaction table. The issue is that for Long Term and Accelerated conditions I have monthly pull dates and for Stressed conditions I only have weekly pull dates. I have no need to calculate pull dates by month for the studies that are completed on a weekly basis. I would like to use the combo box , Samplling Interval, in the Inventory Transaction table to be able to choose by month or week and the corresponding pull dates calculated for the particular conditions.
If you can help with this also that would be great, If not I can get by on what I have created so far.
Thanks