Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 50
  1. #16
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038

    June -- thank you for providing the link to the sample data file. Unfortunately, I did not get it to work. Allow me to summarize what I've done thus far.
    - Copied "MaterialsDatabase" to my H drive (not C drive)... if working, I'd then create a shortcut to the ACCDB file
    - Copied the UpdateScript VB file into the same location... update the file paths to point to our shared drive and changed "C:" to"H:" references
    - Copied both databases into the specified shared drive
    - Added myself to the "Users" table of "LabData" DB
    - Upon opening the "MaterialsDatabase", two things are happening:
    1. A dialogue box scans for DLL file (i.e., "AcroRd32.dll")... I don't have that installed... not sure if that's a critical element.
    2. Upon finishing the scan for the DLL file, the "Login" screens pops up and indicates "You are a new user" (even though I entered a record into the Users table). Once I type in the two initials and press ENTER, nothing happens though.
    Did I miss anything obvious?
    Thanks,
    EEH
    ************************************************
    isladogs -- appreciate your chiming in... always do! I reviewed the PDF; however, unless I were to obtain the SDA Updater Utility, I'm not sure how I can apply your recommendations.
    Thanks,
    EEH

  2. #17
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    June -- thank you for providing the link to the sample data file. Unfortunately, I did not get it to work. Allow me to summarize what I've done thus far.
    - Copied "MaterialsDatabase" to my H drive (not C drive)... if working, I'd then create a shortcut to the ACCDB file
    - Copied the UpdateScript VB file into the same location... updated the file paths to point to our shared drive and changed "C:" to"H:" references
    - Copied both databases into the shared drive
    - Linked "LabData" tables to "MaterialsDatabase"
    - Added myself to the "Users" table of "LabData" DB
    - Upon opening the "MaterialsDatabase", two things are happening:
    1. A dialogue box scans for DLL file (i.e., "AcroRd32.dll")... I don't have that installed... not sure if that's a critical element.
    2. Upon finishing the scan for the DLL file, the "Login" screens pops up and indicates "You are a new user" (even though I entered a record into the Users table). Once I type in the two initials and press ENTER, nothing happens though.

    Did I miss anything obvious?

    Thanks,
    EEH

    ************************************************

    isladogs -- appreciate your chiming in... always do! I reviewed the PDF; however, unless I were to obtain the SDA Updater Utility, I'm not sure how I can apply your recommendations.

    Thanks,
    EEH
    Attached Thumbnails Attached Thumbnails DLL file.JPG   Login.JPG  

  3. #18
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Happy to supply the updater utility but without the main app (commercial software) its of limited use to you.
    Hold the shift key down when you open the updater app to bypass the startup code
    Hopefully the code is documented well enough for you to see how it works
    Attached Files Attached Files
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  4. #19
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    isladogs, June7:

    I will check out the SDA updater sample. In the meanwhile, I have tested a similar approach but need have some additional questions. Please see URL http://www.utteraccess.com/forum/Eas...r-t304808.html) for pushing down updated FE and replace FE on local machine.

    I won't recap the individual steps that author "AncientCPU" provided in his post. However, please allow me what I've done thus far and where I need some additional help with tweaking the "AutoUpdater" (please see attached sample db with BE, FE server, FE local).

    Recap:
    - I created a very fundamental database which only includes one table. I called this database "Database_be".
    - I then created the FE version and linked the BE to the FE.
    - Following the author's advice, I placed both onto the server.
    - Then, I copied the FE onto my "Desktop" (local version).
    - Also, I placed the "AutoUpdater" into the folder of the local version. As described in the author's post, I then updated the information in the form "frmSetup".
    - Also, I changed the message from "No" to "Yes".
    - At this time, I have the BE and FE on my server and a 2nd copy of the FE on my desktop.

    Process:
    - Then, in the FE version on the server, I mererly copied the query and incremented the version value by 1 in table/field [tblLocalVariables].[Value]
    - Having added a query and changed the version value "mimicked" a real-life scenario where system administrator modifed the FE which now needs to be pushed down to the user.
    - I closed the FE on the server and then double-clicked on the "AutoUpdaterAc2k" on the local machine.
    Issue:
    - Please see attached JPG "Process.jpg"
    - Here, as illustrated, I'm getting the message that a "new version" exists. Great!
    - Afterwards, however, an unexpected error is thrown and the FE database (local) machine did NOT open.
    - At the same time though, it appears the FE (local machine) was replaced with FE (server)

    My question: Does anyone know how to address the "Error: 5 invaliad procedure call or argument"? Also, why didn't it open the new FE on the local machine?Thank you,
    Tom
    Attached Thumbnails Attached Thumbnails Process.JPG  
    Attached Files Attached Files

  5. #20
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    I've had a quick look at this and relinked the autoupdater to the local copy of the FE.
    Should it be linked to the server copy of the FE instead?

    I ran a test & the updater seems to work fine when a newer version exists on the server.
    However even when the local copy is the same or newer it still says it has updated
    I haven't got time today to look at it in detail

    However, I've modified the browse button filters so these now include accde & accdb files.
    Modify this line of code in two procedures adding the parts in red:
    Code:
        strFilter = ahtAddFilterItem(strFilter, "Access Files (*.accde. *.accdb, *.mde, *.mdb)", "*.ACCDE;*.ACCDB; *.MDE;*.MDB")
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  6. #21
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    Isladogs - appreciate you taking a look at the loader db. I will double-check the file path references once I get back to the office.

    That said, the following help would be greatly appreciated:
    1. Get rid of the error message.
    2. Don't show "new version" message if server-FE and local-FE are the same... then open local-FE
    3. Or, if versions are different, then show message and replace FE... then open latest FE.

    Thank you in advance for the help.

    Tom

    P.S. Also thanks for the updated code to browse for ACCDB file

  7. #22
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    I don't have time today.
    I agree totally that it should only show that message if updated to a newer version. Otherwise it should either show a message You already have the latest version or no message
    I didn't read the source article and perhaps it would have told me but please check which copy of tblLocalVariables the updater should be linked to - local or server?

    In my own updater app, its connected to the equivalent tables in both local and server copies so the version numbers can be directly compared.

    EDIT
    One difference is that my updater allows copying of multiple files placed in the update folder.
    This is important for my clients as I often include supporting files in the FE folder as well as the FE itself
    Last edited by isladogs; 11-28-2019 at 02:22 AM.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  8. #23
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    isladogs - copy... totally understand about your schedule. Appreciate the help in advance whenever you get a chance.

    In the meanwhile, HAPPY THANKSGIVING!

    Cheers,
    Tom

  9. #24
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,820
    The AcroRd32.dll issue is probably due to VBA reference to Adobe Acrobat library. I removed code that manipulated PDF files but forgot to remove reference. It is not critical, just annoying.

    The VBScript file was only included for info. The db has self-copy code that I posted. The VBScript could still copy the file but is not required. This all assumes your computers will allow programmatic copy of files. Here is code when it called the VBScript.
    Code:
            'Because administrator opens the master development copy, only run this for non-administrator users
            'Check for updates to the program on start up
            'If values don't match then there is a later version
            Set Shell = CreateObject("WScript.Shell")
            Shell.Run CurrentProject.Path & "\Update.vbs"
            Dim WAIT As Double
            WAIT = Timer
            While Timer < WAIT + 3
                DoEvents
            Wend
            Set Shell = Nothing
            Application.Quit

    This db was designed to have backend on a LAN file server (is that what you mean by 'shared drive'?) and frontend copies on each user computer. I use code in Utilities module to set table links with UNC path.

    Go to module Misc and set global variable gstrBasePath. Suppose I should have set up a table to hold this value and load variable from table. Hindsight is wonderful. My folder setup has backend in its own folder, master development copy of db in folder that only I have permission to, and downloadable copy of frontend for users in another folder. gstrBasePath is for path to parent folder that holds those 3 sibling folders. Then search for that variable in code and modify remainder of path as needed. It is used 4 times but the only critical one is in Login form.

    As developer, I normally open db with shift key bypass then manually open Login form. Login process relies on LAN username. After record created in Users table, make sure you are an 'admin' user. When all works, Menu should open after Login.

    I replaced file at Box.com.

    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  10. #25
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    June - thank you... appreciate the additional updates. Not being familiar w/ the MD database, I think the MD database has too many objects for me to figure out the intricacies of the FE copying from LAN to local drive.

    I will continue to see if I can figure out the AutoUpdate database. Thank you again for the help.

    Tom

  11. #26
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,820
    The only objects involved in my auto update copying are tables Users and Update and form Login and the minor adjustments to code already described. Everything else can be disregarded.

    I looked at the AutoUpdater file. A ton of code leading up to a FileCopy command. I still probably won't be able to use this on my network.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  12. #27
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    June7 -- appreciate the feedback. I will have another look.

    WRT to AutoUpdater... yes, while it may have lots of code, I did appreciate the specific steps required the author provided. Not being familiar w/ the auto-update process, his/her directions came in very handy.

    Cheers,
    Tom

  13. #28
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    June7 -- I took another stab at the MD database. Ultimately, I removed all the objects pertaining to your project. Unfortunately, I'm still having a bit of trouble getting it to work. As of now, I have the following objects in the two databases:

    Data_be:
    Table "Updates"
    Table "Users:

    Frontend:
    Link to the two tables in Data_be
    Form "Login"
    Form "Menu"
    Module "Misc"

    - Then, for testing purposes, I created a folder "AutoCopy" on my C-drive (modified the path in Login).
    - Given I'm working from home today, this folder mimicks the folder on the LAN.
    - Next, I created another folder "Local" on my desktop (mimicking the local copy for each user).
    - Finally, I copied the Frontend from folder "AutoCopy" to folder "Local".

    As part of the process test, I then opened database "Frontend" within folder "Local". Unfortunately, it's throwing a bunch of errors.

    Any chance you could have a look at the modified version? Please let me know if there's other code (pertaining to your project) that can be removed... in other words, to keep the code clean, I'd like to only keep VBA that is required for the copying process from LAN to local drive once FE changes on the LAN.

    Thanks,
    Tom
    Attached Files Attached Files

  14. #29
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,820
    Your db does not show setting the gstrBasePath global variable in the Misc module header. Also, not specifying Local as copy destination.
    Code:
    gstrBasePath & "AutoCopy\Frontend.accdb", "c:\Local", True
    Delete all the other code in Misc because referenced objects don't exist. Or delete the Misc module altogether and hard code entire path in Login code instead of using gstrBasePath variable.

    Sorry, I have to backup on "Everything else can be disregarded". There is some ribbon customization in my file that will execute if you don't hold down shift key when opening, however, your reduced file appears to have eliminated most of that aspect. Need to disable line used twice in Menu code because Customization module is gone:
    If Me!Permissions <> "admin" Then Call SetAccessXCloseButton(False)

    Also, your new file is missing reference to Microsoft Internet library reference for code behind Menu.

    Or instead of opening Menu form for testing purposes, delete it and just do a MsgBox "Open Form Here". Menu form does demonstrate restricting user choices (enable/disable buttons).

    Set Login form to open by default with db Options.

    Version number in table must be different from label on Login to trigger autocopy code.

    Run Compact & Repair while holding down shift key. Copy revised file in AutoCopy as well as Local, run the Local copy.


    However, as already stated, programmatic autocopy no longer works for me because of restrictions and revised code as shown in post #24.
    I originally copied to C:\ root because could not copy into any folder then IT set further restrictions and no programmatic copy would work.


    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #30
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    June - wow... way too much customization pertaining to your old project. Sorry, not following it.

    Will continue to look for other generic files/methods that will work for me. Thanks for the help anyways.

Page 2 of 4 FirstFirst 1234 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 10
    Last Post: 08-08-2019, 11:05 AM
  2. Replies: 2
    Last Post: 03-04-2016, 04:32 PM
  3. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  4. Splitting database: "There are no tables"
    By WithoutPause in forum Access
    Replies: 3
    Last Post: 04-27-2015, 10:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums