Opening access form from VB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shailja
    New Member
    • Feb 2007
    • 123

    Opening access form from VB

    Hi,

    Can anyone tell me how to open an access form from VB when access database is closed?

    Form gets open when database is open but I want code to open access form when database is closed?
  • vijaydiwakar
    Contributor
    • Feb 2007
    • 579

    #2
    Originally posted by Shailja
    Hi,

    Can anyone tell me how to open an access form from VB when access database is closed?

    Form gets open when database is open but I want code to open access form when database is closed?
    pls clear it

    Comment

    • Shailja
      New Member
      • Feb 2007
      • 123

      #3
      Originally posted by vijaydiwakar
      pls clear it

      See, I have one form designed in MS Access. Now I want to open that MS Access form from VB. When I click on command button, MS Access form should open. Access form opens from VB only when access database is opened. i.e. I have to keep my database open then n only then I am able to open an Access form from VB.

      If database is closed, i am not able to open an form. I want code of that, How to open an access form from VB when my access database is closed?

      If u know, plz let me know

      Comment

      • Dököll
        Recognized Expert Top Contributor
        • Nov 2006
        • 2379

        #4
        Originally posted by Shailja
        See, I have one form designed in MS Access. Now I want to open that MS Access form from VB. When I click on command button, MS Access form should open. Access form opens from VB only when access database is opened. i.e. I have to keep my database open then n only then I am able to open an Access form from VB.

        If database is closed, i am not able to open an form. I want code of that, How to open an access form from VB when my access database is closed?

        If u know, plz let me know
        Hello, Shailja!

        Sounds like you can really use some help, please stay tuned...

        I could be totally off base with this but, I think VB does not know where to look if an Access database is open. The whole database must be closed, as far I as I can remember, for VB to open/delete/add/update data to it. Again, things may have changed, and I've missed it. Nonetheless, if your VB code is unable to see your report, please add it here so one can take a closer look. I have seen a wonderful tutorial somewhere, should help get you started. With your coe posted I or truly helpful members here will likely help you tackle the task. Please let us know.

        In a bit, Shailja!

        Dököll

        Comment

        • Killer42
          Recognized Expert Expert
          • Oct 2006
          • 8429

          #5
          Originally posted by Shailja
          See, I have one form designed in MS Access. Now I want to open that MS Access form from VB. When I click on command button, MS Access form should open. Access form opens from VB only when access database is opened. i.e. I have to keep my database open then n only then I am able to open an Access form from VB.

          If database is closed, i am not able to open an form. I want code of that, How to open an access form from VB when my access database is closed?

          If u know, plz let me know
          If you're saying that you don't want the database to be opened, then I don't think it's possible.

          If opening the database is alright, then the Microsoft Access Object Library should provide a way to do this.

          Comment

          Working...