Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2004
    Posts
    85

    Unanswered: open another database up?

    from a comand button can i open another database form up? i tried the run application Nup.. i check out the maco's but im not holding my breath.. your wiser input muchly appreciated..








    __________________________________________________ ___________
    I Like Pie!

  2. #2
    Join Date
    Aug 2002
    Location
    Northampton, England
    Posts
    266
    Place this code behind a command button.

    Dim stAppName As String
    stAppName = "C:\Program Files\Microsoft Office\Office\msaccess.exe U:\Access\DBName.mdb"

    Call Shell(stAppName, 1)

  3. #3
    Join Date
    Apr 2004
    Posts
    85
    yeah i tried that thats the code when i tried the run Application through Command button but it gives me a error

  4. #4
    Join Date
    Apr 2004
    Posts
    85
    Private Sub Command197_Click()
    On Error GoTo Err_Command197_Click

    Dim stAppName As String

    stAppName = "C:\Documents and Settings\operator\Desktop\Shane\runners.mdb"
    Call Shell(stAppName, 1)

    Exit_Command197_Click:
    Exit Sub

    Err_Command197_Click:
    MsgBox Err.Description
    Resume Exit_Command197_Click

    End Sub




    Invalid procedure call or argument

  5. #5
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Don't forget about this part

    C:\Program Files\Microsoft Office\Office\msaccess.exe

    so you should have
    stAppName = "C:\Program Files\Microsoft Office\Office\msaccess.exe C:\Documents and Settings\operator\Desktop\Shane\runners.mdb"

    or else you will get an error as each instance of MS Access can only hold one open DB

  6. #6
    Join Date
    Apr 2004
    Posts
    85
    okay i did that it gets closer but didnt like it. tells me to exit access and open with valid source name or something. i checked and it was right i dont think its going to be worth the hassle..

  7. #7
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    [QUOTE=jessy]from a comand button can i open another database form up? i tried the run application Nup.. i check out the maco's but im not holding my breath.. your wiser input muchly appreciated..


    Hi jessy,
    Are you simply trying to open another form in your current database with a CommandButton? If so using your Wizards do this:
    In DesignView from the ToolBox select the CommandButton, the wizard will hit you next with options, you choose FormOperations, then OpenForm and it will present you with a list of forms to open. Choose your form and continue through the wizard. That's about it.

    hope this is what you meant. If not let me know and will try to help again.
    lunchtime
    Bud

  8. #8
    Join Date
    Apr 2004
    Posts
    85
    want i want is a comand button that will open a form from a different database altogether

Posting Permissions

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