Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    Mar 2001
    Location
    Kansas City, MO
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Version check code (97 and 2000)

    We have a mixed environment with most folks having Access 97 and a few with 2000. When someone opens a network database created in Access 97 using Access 2000 we sometimes get corruption. I would like to create code that would check the Access version and block users using 2000. Two questions: Is there code that will check and provide a message denying access and why AND where should the code be placed. Thanks for the help.

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Version check code (97 and 2000)

    Unfortunately there isn't a simple way of doing this. And the problem you are seeing likely comes from people converting the database to 2000, and then 97 users not being able to use it. Probably the simplest way to deal with this is to split the database into a front-end (FE) and back-end (BE), and convert a version 97 FE to to 2000, and point users with 2000 to that new version. There are still potential corruption problems that can occur in the BE, but they are significantly reduced. You will also see some performance degradation compared with a 2000 BE, and in the short to medium term, you should plan to convert everyone to 2000. It is much more stable, and will continue to be supported by MS for some time to come.
    Wendell

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Version check code (97 and 2000)

    How you could make use of this is not clear to me, but I thought it was worth a mention, Have a look at this: Check the Access Version in Code

  4. #4
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Version check code (97 and 2000)

    Rupert,

    Maybe I'm misunderstading what you mean by "How you could make use of this is not clear to me"

    but I would use something like:

    <pre>Select Case SysCmd(acSysCmdAccessVer)
    Case 8
    MsgBox "Access 97"
    Case 9
    MsgBox "Access 2000"
    Case 10
    MsgBox "Access 2002/XP"
    Case Else
    MsgBox "Unknown Version of Access"
    End Select</pre>

    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Version check code (97 and 2000)

    I'm with Rupert here - if you are worried about corruption when you open a 97 database from a 2000 copy of Access, the code won't do any good, because you have to open the database first before you can execute the code, and the first thing that will happen with a 97 database is the Access 2000 will try to convert it. Ergo the code isn't of any value.
    Wendell

  6. #6
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Version check code (97 and 2000)

    I would say that it's not of value in THIS particular case.

    I'm sure that there are cases when this code would come in handy. I just can't think of any right now. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  7. #7
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Version check code (97 and 2000)

    How write code that converts between Access versions

    There's a sample HERE that shows you how to use your code with different versions of Access. Its right at the bottom so you will need to use ctrl end to get to it. (Can I do this in the link?)

    Why you should want to write code which can be used in different versions of access puzzles me, but there must be a logical explanation !

    You could handle:
    Four digit dates.
    Formating message boxes.
    Replace function.

  8. #8
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Version check code (97 and 2000)

    Rupert,

    On this page you can link to that particular "article" by using http://ourworld.compuserve.com/homepages/a...CodeTip.htm#MDE Notice the #MDE at end. That is an HTML anchor to that particular spot on the page.

    The reasons you listed are better than I could come up with as to why use this code.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  9. #9
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Version check code (97 and 2000)

    I must confess <img src=/S/hiding.gif border=0 alt=hiding width=70 height=24> that I did see an article on it somewhere recently, but it didn't strike me as being that useful so I didn't store the link <img src=/S/stupidme.gif border=0 alt=stupidme width=30 height=30>

Posting Permissions

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