The DAO OpenDatabase Method

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
I take it that you have a front end linked to a back end. Some people just open a form (hidden) that loads just a few records from a table in the be. That is supposed to maintain a connection to the be file without a bunch of code. I'd try that simpler method but don't load a bunch of records from any table or you could create record locking issues. That all depends on your record locking settings.

If you really want to do it their way, try opening a form (hidden) and put the opening call in its open event and the closing call in the form closing event. That is outlined in the 'invoking the procedure' link but not well explained IMO.
 
Upvote 0
From your link
For instance, if you have a form that controls the application and remains open during the entire time the user is using your database, add the code to the OnOpen and OnClose events.

I used my login form.
 
Upvote 0

Forum statistics

Threads
1,224,885
Messages
6,181,577
Members
453,055
Latest member
cope7895

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