Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, UK, Berkshire, England
    Posts
    243
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBA equivalent for the Convert to 97 format (XP SP2)

    Can anyone tell me what the RunCommand equivalent of the menu "Convert Database To 97 Format" and "Convert Database To 2000 Format" is please

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

    Re: VBA equivalent for the Convert to 97 format (XP SP2)

    It takes a bit of fiddling, but if you search Access VBA Help for "ConvertAccessProject" it should give you the story. This is the example from it:
    <font color=blue><font face="Georgia">
    Application.ConvertAccessProject _
    SourceFilename:="C:My DocumentsSales-Access97.mdb", _
    DestinationFilename:="C:My DocumentsSales-Access2000.mdb", _
    DestinationFileFormat:=acFileFormatAccess2000</font face=georgia></font color=blue>
    Wendell

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

    Re: VBA equivalent for the Convert to 97 format (XP SP2)

    You're a star Wendell <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>
    I'd not thought that ConvertProject would work on databases, I'd assumed it was ADP's <img src=/S/stupidme.gif border=0 alt=stupidme width=30 height=30>

    Can you help on my next question, how to convert to an MDE file <img src=/S/question.gif border=0 alt=question width=15 height=15>
    I've found the acCmdMakeMdeFile but can't seem to pass in parameters
    - by the way is there any way to do a word search on the Access XP Help, rather than use the index <img src=/S/question.gif border=0 alt=question width=15 height=15>.

    Many many thanks

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

    Re: VBA equivalent for the Convert to 97 format (XP SP2)

    Well, Help doesn't help much with the DoCmd.RunCommand acCmdMakeMdeFile command. It appears you have to trick it to get it to work - a search of the MS knowledge base turned up article 202039 which uses SendKeys to generate the path and filename. A bit ugly - it looks like nobody has looked at this issue since Access 2000.

    As to Access XP Help, it frequently isn't. You can do searches using the assistant, or you can use the "Answer Wizard" but neither will find the acCmdMakeMdeFile. Help has deteriorated significantly from what was available in Access 97.
    Wendell

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

    Re: VBA equivalent for the Convert to 97 format (XP SP2)

    Wendell,

    thanks for trying - glad it wasn't just me finding the Help, a bit of a non-Help. I'm going to a Microsoft UK focus group on "Access" next month, so I'll certainly try and bring it up the lack of Help issue

    Poking around on the net found this on Google Groups <pre>> But just to automate the process further I'd like to automatically
    > create the MDE when done. But I haven't found any method of doing so.
    Totally unsupported, undocumented, and prone to strange issues, but try:
    SysCmd 603, <source> , <dest>
    where <source> is the fully qualified path and name of the source database,
    and <dest> is the fully qualified path and name of the mde you want created,
    such as:
    SysCmd 603, "c:myapp.mdb", "c:test.mde"
    --
    Dan Haught
    FMS Inc. http://www.fmsinc.com</pre>

    But while it works in Access 97, doesn't seem to work in either Access 2000 or 2002 <img src=/S/frown.gif border=0 alt=frown width=15 height=15>
    so I think it'll have to be the SendKeys option, unless anyone knows the equivalent in 2000 and 2002 <img src=/S/question.gif border=0 alt=question width=15 height=15>

  6. #6
    Lounger
    Join Date
    Apr 2001
    Location
    Khon Kaen, Thailand
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA equivalent for the Convert to 97 format (XP SP2)


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

    Re: VBA equivalent for the Convert to 97 format (XP SP2)

    Wendell,

    tried this with partially success.
    The 2002 to 2000 conversion worked fine <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    The 2002 to 97 conversion didn't <img src=/S/frown.gif border=0 alt=frown width=15 height=15>
    - something weird happended to the forms, I could see them in the Forms tab, but couldn't open them in either Design or Normal mode !!

    If it do the process manually, i.e. using the menu options, both 2000 and 97 versions are fine.

    I've tried using VBScript, using SendKeys with some success, but better is a freeware application, called AutoIt. This has excellent control of "Windows", so e.g. it can wait until a specific Window is available, like a Open dialog. This avoids problems I was finding with VBScript where an unexpected window messed up the sequence

Posting Permissions

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