Results 1 to 8 of 8
  1. #1
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398

    Bob Larson's Front End Auto Loader


    I have a slight problem with Bob Larson's FE auto load. I think it is somehow related to my network.

    I've installed per his instructions. I've copied the code to the load event of the form that is opened when my DB is opened. If I step through the code, everything works except reloading MS Access.

    If I just open the form without stepping through, nothing works. It doesn't copy the new DB nor does it open MS Access.

    If I go to the folder where the FE DB is on my machine and execute UpdateDbFe.cmd, everything works properly, including loading MS Access.

    Any suggestions?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Post link to Bob's code and/or provide your attempted code. If you want to provide db, follow instructions at bottom of my post.
    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.

  3. #3
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398
    I think this contains what you'll need.
    Attached Files Attached Files

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Did not provide the backend file.

    The form does not open by default.
    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.

  5. #5
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398
    Here's the BE of the DB.
    Attached Files Attached Files

  6. #6
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398
    I figured out the problem. On the FE DB, I had it set to compact on close. This was causing the shell command to not run. Interesting. Must be a timing issue. Now I have to figure out how to automatically run the compact occasionally.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I suggest it isn't really necessary to compact & repair the frontend every time it runs. I only do this after design edits. Now the backend could be a different matter.
    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.

  8. #8
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398
    I'm creating this application for a client, and I don't know when I'll be back. In other parts of the DB, I'm creating temporary objects, then deleting them. I wrote code to auto compact the FE DB every 10th exit of the application. Heres what I wrote:

    'Turn off auto compact if on
    If Application.GetOption("Auto compact") Then
    Application.SetOption ("Auto compact"), False
    End If

    'Assign variable intAutoCompactCounter with value in table Auto_Compact_Counter
    intAutoCompactCounter = DLookup("Counter", "Auto_Compact_Counter")

    'If intAutoCompactCounter = 10, turn on Auto compact, reset Counter to 0
    If intAutoCompactCounter = 10 Then
    'Turn on Auto Compact
    Application.SetOption ("Auto compact"), True
    'Reset Counter to 0
    intAutoCompactCounter = 0
    Else
    'Add 1 to value of intAutoCompactCounter
    intAutoCompactCounter = intAutoCompactCounter + 1
    End If

    'Assign SQL statement to strSQL to update Counter within table Auto_Compact_Counter
    strSQL = "UPDATE Auto_Compact_Counter SET Auto_Compact_Counter.[Counter] = "
    strSQL = strSQL & intAutoCompactCounter

    'Execute SQL string
    CurrentDb.Execute strSQL

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Another way to Auto Update of Front End
    By rankhornjp in forum Code Repository
    Replies: 23
    Last Post: 03-12-2014, 10:43 PM
  2. Auto Close of Front End
    By Yarbz in forum Programming
    Replies: 1
    Last Post: 08-01-2013, 01:04 PM
  3. Replies: 3
    Last Post: 11-04-2011, 01:50 PM
  4. Auto Run Report then Auto Email
    By jo15765 in forum Reports
    Replies: 1
    Last Post: 10-05-2011, 10:57 AM
  5. auto link between front db and back db
    By ahmed in forum Programming
    Replies: 3
    Last Post: 08-09-2010, 07:10 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