Accessing Query via VBA

Montez659

Well-known Member
Joined
May 4, 2005
Messages
918
So, as stated in an earlier post, I am fairly new to VBA within Access (worked within Excel for years) so I don't have much exp on databases. I created a query (Metrics) to filter my table (Tasks) down to the appropriate month. How can I access this query by VBA and refine my statistics even further? Eventually, I want to find if the completion date of an activity was less than or equal to the start date + 14 days. All I really need is a count of records for most of what i am doing and not individual data (unless comparing begDate and endDate).

Thanks for the repeated help. Oh, and please don't just do it for me, but help me to learn!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Upvote 0
Thanks for the response. I was trying to do it all "behind the scenes" so as to avoid user confusion when they see twenty queries and I wouldn't want them to mess the info up. I found out that I am able to hide these queries from being viewed, but is there any way to lock them for editing? That would be the last level of protection that I would need. Thanks for your help!
 
Upvote 0

Forum statistics

Threads
1,224,520
Messages
6,179,267
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top