How to Use vbScript to Relink Your User's MS Access Application Front-End Automatically

  Рет қаралды 2,386

Sean MacKenzie Data Engineering

Sean MacKenzie Data Engineering

Күн бұрын

Пікірлер: 24
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Make sure to check out the follow up for this video that puts this into a table of links in your database: kzbin.info/www/bejne/oXusi2CYbs6XqMk
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
How many of you have struggled with keeping table links up-to-date? Not always easy!!
@ristantosky
@ristantosky 2 жыл бұрын
in vba access, How to close front end when error popped up (suddenly disconnect because front end sleep)? I meant how to do "docmd.close" when pop up showed up. Or maybe what event name to do next action when connection interupted/disconnected ?
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
That's a tough one! Usually a system error will stop everything else from running, so anything with a timer may be halted as well, meaning that it is hard to makes a procedure that checks for it. It is more likely that a preventative solution will work. If you can see how long a user has been idle for and know the sleep settings on their computer, you could program a check to see how long the user was idle. Use DoCmd.Quit just before their sleep threshold or something. Good one! This could be a neat video topic.
@ristantosky
@ristantosky 2 жыл бұрын
@@seanmackenziedataengineering yeah, big question for me to know how to "catch" this error thing (disconnected BE) for vba access
@mikewashington4188
@mikewashington4188 2 жыл бұрын
Actually, that's a wonderful suggestion of having the names of each table to be relinked in a helper hidden table for example relnk_tbls. The code would loop through the recordset of the helper table relinking each backend table using VBA code. Thanks a bunch
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Maybe I should do another video to show that. I had several people ask about it! Thanks
@mikewashington4188
@mikewashington4188 2 жыл бұрын
@@seanmackenziedataengineering Thanks 🙏🏿. That would be wonderful.
@akokohjoel9854
@akokohjoel9854 6 ай бұрын
How can one do the same to, linking ms access to MySQL with vbscript
@seanmackenziedataengineering
@seanmackenziedataengineering 6 ай бұрын
You don't need to use vbScript to connect to MySQL, you can just download and install the MySQL ODBC Driver > Create an ODBC DSN in Windows for MySQL > Create Linked tables to MySQL > use tables like you use Access tables.
@gerfer6261
@gerfer6261 2 жыл бұрын
👍👍👍👍👍 I have a vb script file to launch db to all users [ mining from google and put it together] I do I prevent users from editing vb script file please? Or any other substitute?
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
You can set permissions on this file so that Users only have read/execute permissions and cannot edit the file. Or, you can put the file in another central location which cannot be changed and then put a .cmd file in All Users to call it, or call the script using Windows Scheduler so the user doesn't know where it is at all.
@pitertoc448
@pitertoc448 2 жыл бұрын
Thanks, keep the good work up
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Thanks, will do!
@dbdata9836
@dbdata9836 2 жыл бұрын
can up plz?
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Here you go: billzone.com/ep_148_vbscript_relink.zip
@bumpersmith
@bumpersmith 2 жыл бұрын
Thanks for the video Could you use strFE = CurrentProject.Path & "\" & MyFE.accdb and strBE = CurrentProject.Path & "\" & MyBE.accdb in the script instead if hard coding the path? I know that you are just trying to make quick videos but it would have been nice to see the table names listed in a table in the front end as you mentioned in the video which would make the script much more practical. Most Databases have many tables which would make this process very tedious.
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Thanks for the feedback! You can use the current directory like this: strDir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName) strFE = strDir & "\MyFE.accdb" strBE = strDir & "\MyBE.accdb"
@bumpersmith
@bumpersmith 2 жыл бұрын
@@seanmackenziedataengineering Thank You.
@iqdevelopmet7809
@iqdevelopmet7809 2 жыл бұрын
great job keep up the good job
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Thanks, will do!
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Download script at billzone.com/ep_148_vbscript_relink.zip
@Djblois1
@Djblois1 Жыл бұрын
The Link seems to be dead now
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
@@Djblois1 Thanks for the heads up - link fixed.
Link and Relink Your Access Front-End App Using vbScript and a Table-Based Approach
17:02
Sean MacKenzie Data Engineering
Рет қаралды 1,8 М.
ВЛОГ ДИАНА В ТУРЦИИ
1:31:22
Lady Diana VLOG
Рет қаралды 1,2 МЛН
$1 vs $500,000 Plane Ticket!
12:20
MrBeast
Рет қаралды 122 МЛН
How to Use vbScript to Open and Work with Data in Access accdb Files - Late Binding Example
12:12
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 222 М.
How to Set Basic Startup Options on Your Microsoft Access Database
13:19
Sean MacKenzie Data Engineering
Рет қаралды 5 М.
How to Use Class Modules in Microsoft Access
26:35
Sean MacKenzie Data Engineering
Рет қаралды 2 М.
Microsoft Access Split Databases:  Automatically Re-Link
30:29
Access Jitsu
Рет қаралды 12 М.
Learn Database Normalization - 1NF, 2NF, 3NF, 4NF, 5NF
28:34
Decomplexify
Рет қаралды 2,2 МЛН
How to Use Inline Queries in Microsoft Access
14:27
Sean MacKenzie Data Engineering
Рет қаралды 767