VBA Shell in Microsoft Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JAMBAI
    New Member
    • Feb 2007
    • 28

    #1

    VBA Shell in Microsoft Access

    Hi,

    I have form (frmOpen) in a vba application (customer.mdb), how do I add an option in that form to open the same vba application ( customerprofile .mdb) again.

    Assuming, there is a button called "Open a copy" in that Form, when a user clicks that button, I need to open the same application (customer.mdb) again leaving the opened application for some process.

    I can do this using Shell Command, but don't know how to restrict the user not to open more than 1 copy.

    Any help

    Thank you
    Jambai
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32669

    #2
    It's not very clear what you're asking for I'm afraid.

    A Shell() command running a script copying a file Customer.Mdb to CustProfile.Mdb will only ever create the one copy anyway.

    As you haven't really shared which command you're trying to execute all I can do is guess what you mean.

    Comment

    • JAMBAI
      New Member
      • Feb 2007
      • 28

      #3
      Ok,

      When a form (frm1) is opened (say in Customer.mdb) I am sending a email web link to a supervisor. When the supervisor clicks that link, i am updating a field in the database and showing the same in that opened form.

      I have to give an option in the form to open the same application (Customer.mdb), so that the user can work on something else till the supervisor clicks that link. There could be chance for the user to open the same form (frm1) in this application.

      In other words how to restrict not to open more than 2 instance of the same application.

      Thank you
      Jambai

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32669

        #4
        I must admit to being a little confused here.

        What you are saying here is not the same thing in a different way - it's completely contradictory.

        In your first post you talk about copying a database file, to a file with a different name, and using a Shell() call. You are also now referring to a form with a different name from that in the first post, within the database.

        If you want to say the first post is completely wrong and that you need to explain again from scratch, then we can't know that unless you tell us. Otherwise the two together make worse than no sense at all - they contradict each other.

        I appreciate that it may be hard for you to express your problem in English, but it's also hard to understand if the English doesn't make sense.

        Comment

        • JAMBAI
          New Member
          • Feb 2007
          • 28

          #5
          The one I said in the second post is my requirement.

          Appologizes for the confusion.

          Thank you
          Jambai

          Comment

          Working...