Open a copy of the Access application rather than the actual shared file (1 Viewer)

aman

Registered User.
Local time
Today, 02:52
Joined
Oct 16, 2008
Messages
1,250
Hi Frothingslosh


Sorry I didn't get it. As I have never used Batch file and access database together, just can't understand what do I need to do?

Do I need to make any changes in Access database?

What changes need to be made in the batch file if my actual accdb is stored in the following shared folder:

L:\Access Databases\Group Manufacturing\MDB

The users will be using a local copy stored in U:\

Sorry to be a pain but can you please help me in this?

Honestly, man, it's easier to just write up the batch file like I suggested in the first place. I'll even attach an example.

I'd help with the Access version, but I just got handed something this morning with a seriously short deadline and don't really have the time to troubleshoot. Just from the sound of it, though, if you're executing it and getting no result at all, it sounds like it's determining that the front end is current.

My suggestion would be to place a Stop command as the first line in the CheckFrontEnd procedure, and then step through the code as it executes so you can see what's going on. Another option is to use the immediate window to print the value being returned by the procedure so you can see what it's reporting.

I'll try to check the thread when my phone tells me it has replies, but I doubt I'll be able to help much until this evening.

Edit: Helps if I attach the batch file! :banghead:
 

aman

Registered User.
Local time
Today, 02:52
Joined
Oct 16, 2008
Messages
1,250
Hi Gasman

I tried this link but when I try to run the FE Updater.exe file then it gives me "This program is blocked by Group policy, For more information, contact your system administration. "


aman,
Check out this thread

https://access-programmers.co.uk/forums/showthread.php?t=293847&highlight=update+front+end

and post #8 in it.

This is what I use and it works brilliantly.

When the user opens the FE, they get told they do not have the latest copy and a batch file created on the fly copies the latest and then reopens the FE.
 

Gasman

Enthusiastic Amateur
Local time
Today, 10:52
Joined
Sep 21, 2011
Messages
14,232
Well I can't help with that, but looking at it again, I'm not sure I'm using that version.
Mine is like Frothingslosh's version, just 3 files and some code in the login form.

This has prompted me to create a small DB that I can import to any more DB I create and get it installed reasonably easy.

You can try it out if you want though it is not fully tested.

Import everything into your FE.
Run LinkVersionMaster in Module 1. I'd suggest doing it in the code window just to check everything. It;s only a few lines. Run it with F8, so you can see how it works.

It will ask you for an already linked BE table name, so as to get the BE path.
It will then copy the fe_master file to the BE and link to it renaming the original to fe_master_local

Then in your login form put in the Load event

CheckFE

Hopefully that should be it.

There are two forms in it as well. One to keep a log of changes and another to update the tables and create an accde. I've yet to fully test these as my next DB is still a single DB in construction.
If you don't use the form, make sure you have put some version numbers in each table plus the BE path.

HTH

I would appreciate if you tell me how you get on if it is successful, as it might prove useful to someone else, you never know.

Hi Gasman

I tried this link but when I try to run the FE Updater.exe file then it gives me "This program is blocked by Group policy, For more information, contact your system administration. "
 

Attachments

  • Version_Control.accdb
    808 KB · Views: 100
Last edited:

isladogs

MVP / VIP
Local time
Today, 10:52
Joined
Jan 14, 2017
Messages
18,209
Attached is my take on this...

I use a small Access 'splash' utility to do the same thing - SDAUpdater.accdb
I prefer this to using a batch file and command window

This has 2 linked tables
a) tblLocalVariables - linked to the local program file and containing the version info & upgrade folder path on the network
b) UpgradetblUpdaterVersion - linked to a copy of the splash utility in the specified upgrade folder

As with all other similar approaches, the updater checks the local version number with that in the network upgrade folder.
If the local version is up to date, the updater utility automatically closes & opens the program file
If the network version is newer, files are first copied to the local folder & then as above. It uses Windows API call to copy files so its fast e.g. 130MB in a few seconds

The utility also checks if there is a newer version of itself on the network.
If so, it copies that file & renames as SDAUpdaterNEW.accdb

When the main program file opens, it looks for SDAUpdaterNEW.accdb & if it exists, renames it as SDAUpdater.accdb.

The zip file contains the updater utility and a PDF file which explains this in more detail with screenshots

If interested, open the SDAUpdater.accdb file using the Shift key so you can see the code & adapt the linked tables for your own purposes.

HTH
 

Attachments

  • SDAUpdater.zip
    572.7 KB · Views: 111

aman

Registered User.
Local time
Today, 02:52
Joined
Oct 16, 2008
Messages
1,250
Thanks Ridders, I am getting the attached error message when trying to open the linked tables :(
 

Attachments

  • Doc2.doc
    32 KB · Views: 103

isladogs

MVP / VIP
Local time
Today, 10:52
Joined
Jan 14, 2017
Messages
18,209
Thanks Ridders, I am getting the attached error message when trying to open the linked tables :(

Did you open it holding down the Shift key as instructed?
Doing that bypasses the start up code which checks for valid links

As I said in my last post it links to 2 external files connected to my database.
Unless you use the Shift key, you WILL get errors as you don't have the linked files

I supplied it so anyone interested could use the code and modify for their own use...
 

Gasman

Enthusiastic Amateur
Local time
Today, 10:52
Joined
Sep 21, 2011
Messages
14,232
Jeez, do you even look at the code? :banghead:

That has Ridders path to the DB for it to work on his DB.
You have to amend the code for your paths.?

I am beginning to think you want everyone to do the work for you?:eek:

Thanks Ridders, I am getting the attached error message when trying to open the linked tables :(
 

aman

Registered User.
Local time
Today, 02:52
Joined
Oct 16, 2008
Messages
1,250
Gasman, coming to conclusion so early is not that good. I knew I had to amend the code but what I meant earlier was even when I try to open the table using shift key , the path error message is coming up.

Jeez, do you even look at the code? :banghead:

That has Ridders path to the DB for it to work on his DB.
You have to amend the code for your paths.?

I am beginning to think you want everyone to do the work for you?:eek:
 
Last edited:

aman

Registered User.
Local time
Today, 02:52
Joined
Oct 16, 2008
Messages
1,250
Yes Ridders, I used shift key as you suggested but still getting that error :(

Can you remove the link in the table and send me the accdb? I will make them the link tables in my database.

Thanks

Did you open it holding down the Shift key as instructed?
Doing that bypasses the start up code which checks for valid links

As I said in my last post it links to 2 external files connected to my database.
Unless you use the Shift key, you WILL get errors as you don't have the linked files

I supplied it so anyone interested could use the code and modify for their own use...
 

isladogs

MVP / VIP
Local time
Today, 10:52
Joined
Jan 14, 2017
Messages
18,209
I know for a fact that holding down the Shift key will bypass the start up code.
I know because I designed it to do so as a 'back door' if needed.

Try opening it by that method from a non trusted location
If necessary repeat from a trusted location.

If you still can't do it successfully for some reason, create a new blank db and IMPORT all items EXCEPT the 2 linked tables
 

aman

Registered User.
Local time
Today, 02:52
Joined
Oct 16, 2008
Messages
1,250
ridders, I am still not able to open linked tables :(

Though I can see everything else when I open the database by pressing shift. I can see all the code etc... its just the linked tables , I want to know the linked tables structure so can pls send the tables structure ?

Thanks
 

Gasman

Enthusiastic Amateur
Local time
Today, 10:52
Joined
Sep 21, 2011
Messages
14,232
I can also confirm that I can open it fine without any error messages using the Shift key as well.

I know for a fact that holding down the Shift key will bypass the start up code.
I know because I designed it to do so as a 'back door' if needed.

Try opening it by that method from a non trusted location
If necessary repeat from a trusted location.

If you still can't do it successfully for some reason, create a new blank db and IMPORT all items EXCEPT the 2 linked tables
 

Frothingslosh

Premier Pale Stale Ale
Local time
Today, 05:52
Joined
Oct 17, 2012
Messages
3,276
He's obviously in over his head.

His error messages are because he's trying to open ridders' linked tables, despite being expressly told that's impossible.

At this point, aman, I think your best option is going to be hiring someone, maybe a contractor.
 

aman

Registered User.
Local time
Today, 02:52
Joined
Oct 16, 2008
Messages
1,250
Frothingslosh , What I need to know is the structure of the linked tables (field names ,data types etc...)?

Hope it makes sense.
 

isladogs

MVP / VIP
Local time
Today, 10:52
Joined
Jan 14, 2017
Messages
18,209
Aman

Several people have responded to this thread with comments along the lines that you are expecting everything to be done for you.
Although you claim that isn't the case, it does seem like that to me as well

ridders, I am still not able to open linked tables :(

Of course you can't - and I made that clear from the start

Though I can see everything else when I open the database by pressing shift. I can see all the code etc... its just the linked tables , I want to know the linked tables structure so can pls send the tables structure ?

Thanks

As I said in my first post, there are 2 linked tables:
a) tblLocalVariables- linked to the local program file and containing the version info & upgrade folder path on the network.
That was all you needed to know to create your own version
There are other fields specific to my program file but they aren't used by the updater
b) UpgradetblUpdaterVersion - linked to a copy of the splash utility in the specified upgrade folder
This is IDENTICAL to the local table tblUpdaterVersion

With some reluctance, I am doing what you ask and have attached a modified version including both of these as local tables

Now I'm expecting you to work through the code and understand how it works for yourself.
If you want more help than that, you are welcome to pay me to write the updater specifically for you!
 

Attachments

  • SDAUpdater.accdb
    800 KB · Views: 89

aman

Registered User.
Local time
Today, 02:52
Joined
Oct 16, 2008
Messages
1,250
sorry to be a pain ridders. But thanks a million for all your help so far.
 

aman

Registered User.
Local time
Today, 02:52
Joined
Oct 16, 2008
Messages
1,250
Gasman, I have tried the code and there are few things as below:

1. If the "fe_version_number" in table "tbl-fe_version" matches with "tbl-version_fe_master" then code works perfectly fine and the database gets opened.

2. If the version number doesn't match then the message comes up "Your program is not the latest version, the frontend needs to be updated".

And then old local file gets deleted and new copy is made in the local drive.

But when the new copy is opened then it doesn't update the version number in "tbl-fe_version" and that's why again the step 2 is repeated and It keeps on repeating (Delete the old and create a new file).

We need to write the code to update the old version with the new version in the table.

Do you have any thoughts on this?

Thanks


Well I can't help with that, but looking at it again, I'm not sure I'm using that version.
Mine is like Frothingslosh's version, just 3 files and some code in the login form.

This has prompted me to create a small DB that I can import to any more DB I create and get it installed reasonably easy.

You can try it out if you want though it is not fully tested.

Import everything into your FE.
Run LinkVersionMaster in Module 1. I'd suggest doing it in the code window just to check everything. It;s only a few lines. Run it with F8, so you can see how it works.

It will ask you for an already linked BE table name, so as to get the BE path.
It will then copy the fe_master file to the BE and link to it renaming the original to fe_master_local

Then in your login form put in the Load event

CheckFE

Hopefully that should be it.

There are two forms in it as well. One to keep a log of changes and another to update the tables and create an accde. I've yet to fully test these as my next DB is still a single DB in construction.
If you don't use the form, make sure you have put some version numbers in each table plus the BE path.

HTH

I would appreciate if you tell me how you get on if it is successful, as it might prove useful to someone else, you never know.
 

Frothingslosh

Premier Pale Stale Ale
Local time
Today, 05:52
Joined
Oct 17, 2012
Messages
3,276
No, you don't.

Read the code. Understand the code. Never use code that you cannot understand, because then you can't troubleshoot it.

While you're at it, go back and actually read the post that I linked for you. I specifically described the situation you're dealing with right now, what causes it, and how to avoid it.
 

aman

Registered User.
Local time
Today, 02:52
Joined
Oct 16, 2008
Messages
1,250
Yes it worked great. Thanks Frothingslosh :)
 

Users who are viewing this thread

Top Bottom