Results 1 to 6 of 6
  1. #1
    smeghead67 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    31

    Load a Linked table into front end when switchboard starts [Solved]

    Greetings all,



    In the database i created, I have an excel file that i have created a linked table for. What i use it for is the end users will enter a asset number and a macro in my form will do a DLookup to get a serial number from the table that matches the asset number. The excel file has much more info in it than is used, currently, in my data base. If i have the table open in my front end, the look up is instantaneous. If isn't, it will take over 30 seconds to come back with the data.

    My question is, what do i do to make this linked table open when a user starts the front end of the database? can i make it load in the background? as it takes 30 seconds to load into the front end. I want this to be automatic so the end users do not have to manually do this.

    Smeghead
    Last edited by smeghead67; 02-08-2013 at 03:34 AM. Reason: solved

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    So, no matter what, will be a 30-second wait before user can proceed? Maybe either bind default open form to the linked Excel object or code behind the default form runs a query or DLookup.
    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
    smeghead67 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    31
    June,

    I forgot to mention that i tried putting a DoCMD.OpenTable in the "on load" property of the switchboard, access didn't like that very much. maybe i will put it into the on load of the form i need. I will let you know if it works.

    Ted

  4. #4
    smeghead67 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    31
    Ok,

    I put an event procedure into the "on Load" in the event tab of the property sheet.

    Code:
    Private Sub Form_Load()
    DoCmd.OpenTable("MPI Game Master File", acViewNormal, acReadOnly)
    End Sub
    Gives me a syntax error.

    Does any one have a suggestion?

    Ted

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    I tested OpenTable in a form load event and it worked just fine. Can't see any issue with your code syntax. The parens are not needed but did not cause me issue.
    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.

  6. #6
    smeghead67 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    31
    June,

    I played with it and got it to work, here is what the final code looks like.

    Code:
    Private Sub Form_Load()
    Dim Dumb As String
    Dumb = "MPI Game Master File"
    DoCmd.OpenTable Dumb, , acReadOnly
    End Sub
    I thought that the name of the table was causing grief, also i had the acview as the default, so i just left it blank to set it as default. This combination is making it work. The form doesn't display until the table loads.

    Ted

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

Similar Threads

  1. Replies: 5
    Last Post: 11-13-2012, 12:16 PM
  2. Replies: 5
    Last Post: 04-13-2012, 02:51 PM
  3. Replies: 7
    Last Post: 09-13-2011, 01:38 PM
  4. load csv data into linked table
    By acces2oracle in forum Programming
    Replies: 2
    Last Post: 09-12-2011, 04:47 AM
  5. How to add ID 1 above table that starts with ID 2 ?
    By Plomo in forum Database Design
    Replies: 2
    Last Post: 09-03-2009, 12:19 PM

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