Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Aug 2002
    Location
    Grand Rapids, Michigan, USA
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Updating forms in another database (Access 2000/XP)

    I have a large database at a customer site. To keep them posted with changes, I just want to send an email with a small database with changes.

    I created an "update database" that includes any forms or other objects that I've changed. They just click a button, and it copies the new objects in. this works fine. But before I copy the new forms or other objects in, I want to rename their current objects to the same name + put todays date at the end of the line.

    I can open the 2nd database using DAO, but can't figure out how to rename the objects in the 2nd database, then close the 2nd database.

    By Dimming the 2nd db as an object, I can open the 2nd db, rename the objects, but not close the db.

    by dimming the 2nd db as a database, I can open the 2nd db and close it, but it's renaming the objects in the 1st db instead.

    Any help would be appreciated. - Andy

  2. #2
    New Lounger
    Join Date
    Aug 2002
    Location
    Grand Rapids, Michigan, USA
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    No responses

    I havent gotten any responses on this. Does someone have any ideas?

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: No responses

    Hi,
    You should be able to do this using code something like this:
    Dim appAccess As Access.Application
    Set appAccess = New Access.Application
    appAccess.OpenCurrentDatabase ("c:databasename.mdb")
    appAccess.DoCmd.Rename "Renamed Form", acForm, "Original Form"
    appAccess.Quit
    Set appAccess = Nothing

    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

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