Results 1 to 6 of 6

Thread: How to open a .mdb-file??

  1. #1
    Hu9o
    Guest

    How to open a .mdb-file??

    Hi everyone,

    I have a little problem with opening a Access database file (.mdb). It is my first time I am wrestling with databases.

    What I want is; run a form that is in the .mdb file. I hope that it is even possible.


    I have done a little searching before posting here and I found that I need to use ODBC??? what ever that is. Am I right about that? or are there other ways to open a DB file?

    Thanks a lot,


    Hu9o

  2. #2
    Lively Member
    Join Date
    Nov 2001
    Posts
    89
    Are you trying to do this from VB or is your system in Access, meaning that your end users will work in Access itself?

    If you are going to be opening an Access database from inside VB, you shouldn't need an ODBC connection if you use the Microsoft Access 8.0 Object Library. (8.0 = Access 97, 9.0 = Access 2000) This library gives you alot of functionality when dealing with Access.

    If all you want is the one form, and nothing else from the Access database, you'd probably be better off to just rebuild the form in VB and modify any code that is VBA to VB.

    It would help if you could explain a little bit about what you are trying to accomplish.


    --KSW

  3. #3
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    If you want to use a form that is in the MDB file you need to use the Access Object Library to Open up access and have control over the form. This will only work on machines that have access installed.

    Using ODBC would allow you to get to the data in the databse, but not the Forms.

    Hope this helps,

  4. #4
    Hu9o
    Guest
    Thanks for the replys so far.

    The database contains several forms. All the forms are linked together, an each form uses data from the database.
    The end users only need a .exe file to start. And my problem is how to show one form from the database. So I would say that the users don't work in access. The program is just on a single PC, and only has one user at a time. The database is developed in Access 2000.

    Hopefully I have given enough information......

  5. #5
    Lively Member
    Join Date
    Nov 2001
    Posts
    89
    It sounds like the users really will be in Access and that your real question is when an Access database is opened, how do you show a particular form. I don't understand what VB is really doing for you here. If that's true, in the Access db, create a macro named AutoExec The only action in it should be OpenForm Then set the FormName property. This macro will then execute on open of the db, whether that is from a shortcut on the desktop to Access or if it is opened through VB. If you want to open the Access db without running the AutoExec, which as a developer you will most likely need to do at some point, hold down the SHIFT key while the db opens. The AutoExec will not execute then. There is also a command that can hide the database window so that the users don't have access to it, but I can't seem to find it right now. This would secure the system so that the users can't get into the design view of anything.

    --KSW

  6. #6
    Hu9o
    Guest

    Thumbs up

    hmmm, that what you say ksw is even better! I tried it out, and it works fine. If you could only find that command for hiding the database window, it would be really great!

    Hu9o

Posting Permissions

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



Click Here to Expand Forum to Full Width