Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2002
    Posts
    17

    Unanswered: check for newest version on LAN

    We have an MS Access and I am always adding new things to the front end MDB that everyone in the department uses. The newest version of the DB is getting stored on the network locally.

    What I want to do is make the front end MDB check whether a newer version exists and make user a note about that.

    How can I accomplish this task??? The version number is stored on a front end MDB non-linked table.
    Ali G is da best

  2. #2
    Join Date
    Jan 2003
    Posts
    126
    Shouldn't be too hard, you can either make it open the new db and check the version, or have it read in a txtfile out on the network with version information.

    Just compare the two and if they are not the same send the user a note.

    Ken

  3. #3
    Join Date
    Apr 2002
    Posts
    17
    the problem is I cant get two version strings to compare them. I need the same record but on different MDB's.

    Can someone give some coding example?
    Ali G is da best

  4. #4
    Join Date
    Jan 2003
    Posts
    126
    hmmm, do you have more then one value in the version table?

  5. #5
    Join Date
    Apr 2002
    Posts
    17
    there is only one value, the version number.

    Basically, all I need is code opening the external database and retrieving the record.
    Ali G is da best

  6. #6
    Join Date
    May 2002
    Location
    Atlanta, GA
    Posts
    117
    Hey basas,

    You will need to use vb for this. Make sure you reference DAO, and alter the following code to suit your needs:

    Dim db as Database
    Dim rs as Recordset
    Dim myPath as String
    Dim myText as String

    myPath = "C:\myData.mdb"

    Set db = DBEngine.Workspaces(0).OpenDatabase(myPath)
    Set rs= db.OpenRecordset("Table", dbOpenDynaset)
    rs.MoveFirst
    myText = rs!Field
    rs.Close


    This of course is just an example, but it shows how to open a table in another database and find your data. Let me know if you have any questions.

    Kal

  7. #7
    Join Date
    Apr 2002
    Posts
    17
    Thanks a lot. I have been trying to use DLookup and that was my mistake
    Ali G is da best

  8. #8
    Join Date
    Jul 2002
    Location
    Australia
    Posts
    147
    We use a simpler method. Simply keep a copy of the master front-end somewhere on your network, but use a versioning system in the name. eg. mydb_v3.mdb, mydb_v7.mdb etc.

    Then point your users shortcut to a common script (.cmd) such as this:

    Code:
    @echo off
    if not exist "c:\Documents and Settings\All Users\Documents\Data\MyDB_V1.7.mde" goto getdb:
    goto startdb
    :getdb
    md "c:\Documents and Settings\All Users\Documents\Data" >nul
    del "c:\Documents and Settings\All Users\Documents\Data\MyDB*.md*" >nul
    copy l:\Master\MyDB_V1.7.mde "c:\Documents and Settings\All Users\Documents\Data" >nul
    :startdb
    "c:\program files\microsoft office\office\msaccess.exe" "c:\Documents and Settings\All Users\Documents\Data\MyDB_V1.7.mde"
    So whenever the user clicks on the shortcut, it checks to see if they have the latest version, and if not, copies it from the network, then opens it.

    When you release a new version, name it accordingly and alter its name in the script.

    Cheers,
    Andrew
    There have been many posts made throughout the world.
    This was one of them.

Posting Permissions

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