Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jul 2001
    Location
    Helsingborg, Switzerland
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update links (2002)

    Hi
    I've made a f/b mdb and would like to refresh the links when the front end opens. Found some code for VB but it didn't work. Any suggestions?

    Christer

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Update links (2002)

    Hello Christer,

    "Found some code for VB but it didn't work." I fear that is too little information to go on. If you would like to receive help, please be more specific:

    - What code did you use?

    - What went wrong?
    - You got an error message (which message?)
    - Nothing happened
    - Something happened but not what you expected (what happened?)

  3. #3
    New Lounger
    Join Date
    Jul 2001
    Location
    Helsingborg, Switzerland
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update links (2002)

    Hello Hans

    The VB code is in the code.txt file.
    I got an error message on the first Dim statement "Type not defined"

    Regards

    Christer
    Attached Files Attached Files

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Update links (2002)

    Hi Christer,

    This code was originally written for Access 97, I think. It uses the DAO (Data Access Objects) library. This is available in Access 2002, but by default, there is no reference to it. You need to do the following to make the code valid:
    <UL><LI>In the Visual Basic Editor, select Tools | References...
    <LI>Locate "Microsoft DAO 3.6 Object Library" in the list and tick the check box.
    <LI>Click OK.
    <LI>Prefix declarations of DAO objects:

    Dim dbsCurrent As DAO.Database
    Dim tdfLinked As DAO.TableDef

    Dim rstRemote As DAO.Recordset

    This avoids confusion and makes it clear that these variables are DAO objects.[/list]You will have to adapt the code further to make it work - it points to a SQL Server database named "pubs" now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •