Results 1 to 4 of 4
  1. #1
    martinreed is offline Novice
    Windows Vista Access 2007
    Join Date
    Dec 2013
    Posts
    1

    aunching another database from within a database.

    Hi everyone,
    I have a series of unrelated access databases and I would like to have one 'super menu' where i can click a button to go to different databases.
    I'm no VBA expert so would appreciate a 'answer for a dummy' reply.


    Thanks

  2. #2
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by martinreed View Post
    Hi everyone,
    I have a series of unrelated access databases and I would like to have one 'super menu' where i can click a button to go to different databases.
    I'm no VBA expert so would appreciate a 'answer for a dummy' reply.
    Thanks
    What's the general purpose?

    Are you working on one database and then closing it and then opening a totally different business/database?

  3. #3
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    I believe you would need to use Application Object.

    Ideally you are asking via VBA to create an object (that being Access) and use it to run the set task.

    So make object A = Access program

    then tell A what to do (you don't actually type this - I am giving a basic example to help you understand).

    To read on this

    http://msdn.microsoft.com/en-us/libr...ffice.10).aspx

    just guessing here because I have never tried it but

    I would:

    1. make a string to store the name of the path where the database file is.
    2. create an object
    3. have it open to a form

    so

    Code:
    dim strPathOfData as string 'text of the path will be a string
    
    Dim appAccess As Access.Application 'this will be telling what appAccess will be in this case - access 
    
    strPathOfData = c:/filelocation/databasefile.accdb 'telling what the string will be - get your file path (a place where the file will never move from)
    
    appAccess.NewCurrentDatabase strPathOfData 'one of the the possible processes you can use - in this case you are asking the application Access  *which is appAccess to .NewCurrentDatabase - open string path.
    
    
    Might not work if you just paste it but that is how I guess it would work.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    What do you mean by 'go to'? Do you just want to open another Access file? Are these other dbs all-in-one (tables and forms, etc.)? Or do you want to link to tables in other Access file?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 11-27-2013, 09:51 AM
  2. Replies: 4
    Last Post: 08-21-2013, 07:08 AM
  3. Replies: 2
    Last Post: 01-28-2013, 04:42 PM
  4. Replies: 5
    Last Post: 05-16-2012, 12:48 AM
  5. Replies: 3
    Last Post: 05-15-2011, 10:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums