Results 1 to 3 of 3
  1. #1
    hnhpak is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Jan 2015
    Location
    Karachi Pakistan
    Posts
    28

    Red face VBA Code for Open another Access Application with command Button

    I have following code to open another access database with a command button:



    Application.FollowHyperlink "D:\Database\database.accdb"

    I want to save the path in a table and want to execute the command with taking path and file name from table "PathReferences"
    Say for example have table with fields

    ID:
    ApplicationName
    ApplicationPath

    According to above the ApplicationName is database.accdb
    and the ApplicationPath is "D:\Database\"

    I want to make a code something like this:

    Application.FollowHyperlink " [PathReference].[ApplicationPath]"&"[PathReference].[ApplicationName]"

    Do any one can help to make the code for this purpose?

    Further to that:


    I have a Navigation form in an Access database.
    When I click on a button I want to open a particular form in a (different) particular Access Database.
    Is this possible with some VBA code?

    Thanks in advance

    Haseeb

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Review https://www.accessforums.net/forms/h...ing-52443.html

    Do not put variables within quote marks. Cannot reference tables directly.

    Have the form in other db set as the form to open by default when db opens.
    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.

  3. #3
    hnhpak is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Jan 2015
    Location
    Karachi Pakistan
    Posts
    28
    thanks June the matter solved.

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

Similar Threads

  1. Replies: 3
    Last Post: 03-29-2015, 07:42 PM
  2. Replies: 6
    Last Post: 02-15-2015, 11:51 AM
  3. Replies: 3
    Last Post: 10-20-2014, 03:25 PM
  4. code to open table from Command Button
    By DMJ in forum Database Design
    Replies: 1
    Last Post: 02-20-2014, 12:33 PM
  5. Replies: 10
    Last Post: 09-15-2011, 03:58 PM

Tags for this Thread

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