Results 1 to 15 of 15
  1. #1
    Star Lounger
    Join Date
    Apr 2003
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    USING MACRO (A97)

    Hi experts,
    I have a question about using macro to open another access from access. I do not know which action should I use and code to apply. Pls help <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>

    thks n regards
    nuglorious

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: USING MACRO (A97)

    Can you explain why you would want to open another instance of Access (if that is what your question means) and what you want to accomplish?

  3. #3
    Star Lounger
    Join Date
    Apr 2003
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: USING MACRO (A97)

    thanks 4 yr prompt reply. The reason why i use access to open another access is because the other access has a link with the one im using now. So whenever i need to check 4 the updated data, I would open the other database directly instead of go to directory and look on my database.

    I hope my explanation will give you an understanding ... <img src=/S/artist.gif border=0 alt=artist width=34 height=29>

    Looking forward for your reply ....

    nuglorious

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: USING MACRO (A97)

    No, I don't understand. If the data lives in the "current" database, why would you go to another database that contains a link to the current one to check? You can check in the current database, because that is where the data are.

  5. #5
    Star Lounger
    Join Date
    Apr 2003
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: USING MACRO (A97)

    thks for your suggestion but what i mean link here is no the direct link but by the file name from the second database i have created a make-up table in the query and copy to the main database. Which means whenever i update frm the second database table then i need to update to my first database table. Thts y i need to open the second database

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: USING MACRO (A97)

    Sorry, I fail to understand what you are writing. Perhaps somebody else can help you.

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: USING MACRO (A97)

    Let me see if I understand. You have a main database and a second database. You're using a maketable query to copy records or values from the second database to the main database, right? So why do you want to open the main database from a macro? And do you mean a macro in the Access sense or are you talking about code, because that's what it takes.
    Charlotte

  8. #8
    Star Lounger
    Join Date
    Apr 2003
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: USING MACRO (A97)

    hi hans
    Thks for your prompt reply and your efforts guidance. I appreciate of yr responds. <img src=/S/compute.gif border=0 alt=compute width=40 height=20>

    regards
    nuglorious

  9. #9
    Star Lounger
    Join Date
    Apr 2003
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: USING MACRO (A97)

    Hi charlotte,
    Thts right. Thank God you understand what im written here.
    Im using macro because im create a command toolbar like menu bar to open this second database. Thats why i have to use access macro.

    regards
    nuglorious

  10. #10
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: USING MACRO (A97)

    You didn't answer my question and you don't have to use macros for a custom toolbar. Code works perfectly well. As for opening the other database, why? If you have a toolbar that lets you run a maketable query, why do you need to open the other database if the maketable query is in the one currently open?
    Charlotte

  11. #11
    Star Lounger
    Join Date
    Apr 2003
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: USING MACRO (A97)

    Let me explain again.
    Currently I have 2 database. The first one is my main database which is for inputing all the data in. the 2nd database is for the update rates which means if theres is a new rates or change rates so while im doing inputing, I will straight way open the 2nd database and update the rates. Once its done, I will click on the query and it will automatically update the rate onto the first database table. So thts how my 2 database working each other.

    Now I want to open the 2nd database frm the 1st database using the customs toolbar. If you think by using macro is not appropreate, do you have any suggestion so that i could open database using toolbar?

    Hopes this will gives u more clearer picture.

    Looking forward for your reply

  12. #12
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: USING MACRO (A97)

    I don't really understand why you have two databases in the first place if all you use the second one for is to store rates. Nor do I iunderstand why you need to open the second database at all or move data between the two databases. If you have a rates table in one database, you could easily attach that table to the other and do all your updating directly in a single database. It sounds to me like you've made this unnecessarily complicated. There may be reasons for doing it as you have described, but you haven't explained what they are or given enough detail about what you're doing to help us make sense of it.

    I realize you want to open the second database from a custom toolbar, but what does that mean? Are you expecting to be able to open the second database and switch back and forth between them or what? There are ways to open another database in code, but they don't necessarily make the other database visible to the user, so you must explain or there is no point in trying to make suggestions.
    Charlotte

  13. #13
    Star Lounger
    Join Date
    Apr 2003
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: USING MACRO (A97)

    its not easy to explain it more in detail. I have to create the 2nd database as for rates because its not just only use for the 1st database but also for input with different types of input. So actually this 2nd database is a main thing for rates and it will be use with 2 other databases.

    Anyway, its ok if no solution on this. I will think of other way to do it...
    Thanks again of your prompt reply and concern...

    regards
    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  14. #14
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Maidstone, Kent, England
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: USING MACRO (A97)

    If you just want to open a specific Access database from the toolbar then create a macro using the RunApp command. You will need to give the path to your Access file as well as the path for the Data base in the Command Line box. for example:-
    "C:Program FilesMicrosoft OfficeOfficeMSACCESS.EXE" "C:reportsReport1.mdb"

    HTH

    Peter

  15. #15
    Star Lounger
    Join Date
    Apr 2003
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: USING MACRO (A97)

    Hello Peter,

    Thank you so much for your help and guidelines as now I can use the toolbar to open the database and update my rates. You saved my days....Im appreciated your prompt responding and concern.

    You are great... <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>

    God bless you

Posting Permissions

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