Timed Upload Function with Multiple User Access DB

CPGDeveloper

Board Regular
Joined
Oct 8, 2008
Messages
190
I have an MS Access Based DB, which has a dozen or so users. The database is split, each user has an executable .accde front end on their respective desktops. The Back End is on a shared Network drive.

I've written a function that searches several pre-determined folders for text files, and then uploads the data in those files into the db. It does this on a timer -- every hour during business hours.

For this to work, I have to choose a user where this function executes. Using a 'getusername' function (getUserName = Environ("USERNAME")), the db determines the windows login id of the user, and I have my upload function kick off only for a specific user.

I do this because if I don't, the upload will potentially kick off for all dozen users, causing duplication and/or multiple errors.

The problem is if this user isn't in the office one day, this process will obviously not run.

Is there a way to determine , at the moment of upload, the windows login of everyone using the db, so then I can choose which user? Or perhaps there's another way to accomplish a data upload on a timer?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
You can run a scheduled task to run a routine in access.
See post 6 here:
https://www.mrexcel.com/forum/microsoft-access/764991-auto-trigger-ms-access-code.html

It might also be wise to allow the program to verify if it has already run and not be able to cause duplicates. As well as have a backup way of kicking this off manually if needed. And even some logging of the event with success or value too.

Note that many people just have the "automated action" in the open event of an access database (of its own). So then the automated task only needs to open the database and that's all (the database should of course close itself as the last of it's automated actions). It's much the same - probably some pluses and minuses either way depending on preference.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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