 |
|
 |
yronium Level: Moderator

 Registered: 14-04-2002 Posts: 907
|
Re: Coverting an MS access database
Some reflection points:
- in order to create a stand-alone executable file you need to 'compile' the programming language code, so you need an appropriate compiler. The bad news is that there are no existing compilers for MS Access files. It's an old question that periodically appears in the database's newsgroups, and I never read yet a positive answer.
Once I heard about the MS Office Developers Kit, but I've never seen it in action. I seem to remember that it includes a tool to export Access files in a stand-alone format (readable in any MSAccess-less machine), but I don't know how much this is true.
- if you only need to export Access data (say tables), and no forms or reports, there is a simpler solution:
you can create your executable program using VB, with its own forms, reading your external .mdb file through ADO (or DAO), and compile it. Then you can include the .mdb file into the setup pack, and this file will be read even in machines without Access. This is because ADO and DAO don't need Access to read an .mdb file, as they include the Jet engine - or some other engines - to open the db.
The only difference is you will have two separate files: the db and the executable. Of course all the other required files have to be included in the pack, but normally it's automatically done by the setup creation tool.
- if you add to your VB project a reference to MSAccess object, you can even execute some Access' specific operation, such as compacting/repairing the db, in machines without Access. You can check if Acces is installed in the target machine, and in this case you can run the forms and reports included into the .mdb. There are samples into the Tips section of this site, and you can find more searching around in the web.
Hope all this is useful
____________________________
Real Programmer can count up to 1024 on his fingers
|
|
12-09-2004 at 11:35 AM |
|
|
yronium Level: Moderator

 Registered: 14-04-2002 Posts: 907
|
Re: Coverting an MS access database
I saw your db, and it's quite simple. You just had to reproduce three forms in VB, and that's I suggest. You just keep the tables into the .mdb file, create your own designed forms and include queries into the code (do you know that you can show the SQL instruction of each query by the View|SQL view menu, then copy it and paste into your VB project?). Finally you can compile your project and distribute both the .exe and the .mdb files. You can even pack them into a setup pack.
quote: I got a good idea on how to approach that.
What this idea is?
quote: can u pls suggest me some tutorial to go thru which wil make things a bit easy.
Tutorials... VB tutorials or Access tutorials? Anyway, you know, I started with Access. I was looking for a book to learn it, but I bought the wrong book. It was a developers book, so it was full of code-customized forms and reports. I studied it and made every exercise on it, and later I moved from VBA to pure VB.
This site has its own Tips section, and every VB site has it. You can just type 'Visual Basic', 'Visual Basic tutorial' or 'MS Access tutorial' into Google's search box and you'll got plenty of links to sites, and everyone has some tutorials into it for sure, so you can finally choose your favorite (just never mind the Microsoft sites' links, not easy for beginners. You'll go there later).
If you prefer books - I often read books - my favorite are Microsoft Press and McGraw Hill books. Some titles:
[MS Access]
- E. Callahan "Microsoft Access 97 Visual Basic Step by Step" - Microsoft Press (my first 'wrong' book, good to deepen Access knowledge and to introduce VBA)
[MS Visual Basic]
- M. Halvorson "Microsoft Visual Basic 6 Professional Step by Step" - Microsoft Press (for beginners)
- F. Balena "Programming Microsoft Visual Basic 6" - Microsoft Press (a complete course)
Books problem is they are expensive, but I like anyway keeping some books ready to consult.
Finally another wide information source is following the forums, like this, and the newsgroups.
Hope you'll find your way thru.
Keep in touch here.
____________________________
Real Programmer can count up to 1024 on his fingers
|
|
13-09-2004 at 12:27 PM |
|
|
yronium Level: Moderator

 Registered: 14-04-2002 Posts: 907
|
Re: Coverting an MS access database
quote: I have just started working on this. and did the following...
I didn't see it yet, as I'm not at my pc now, and I have Access 97 and no VB here. I'll see it asap
quote: how to call the standard print command dialog box [...] from visual basic form
You have to add a Windows Common Dialog control to your project, specifying it by the Project|References menu. It allows to call many standard Win32 dialog boxes, included Print and PrintSetup.
quote: and the find command from visual basic form
Do you mean the Find (file or directories) window from the Start menu? Or a simple Find command to execute queries through your recordset?
quote: do i need to have a mdi form with child forms so that when I click a button on one form other form gets called
No. An MDI form is a child form, that's contained into a parent form. Think at MS Word interface: it has a Main (parent) form, with menus and command bars, in which you can open several document windows (children), which you can arrange or bring to top by the main window's Window menu.
In your project you can use normal SDI forms, and keep open together all the ones you need. To open one form from inside another, just use the instructionPrivate Sub btnOpenSecondForm_Click()
frmMySecondForm.Show
End Sub |
Hope it helps
____________________________
Real Programmer can count up to 1024 on his fingers
|
|
16-09-2004 at 08:03 AM |
|
|
yronium Level: Moderator

 Registered: 14-04-2002 Posts: 907
|
Re: Coverting an MS access database
quote: ==> how can I get the Find and replace standard windows dialog box to be called on a button click?
I'm afraid you can't. Find and replace window is an internal MS Access object, so you can include it into your project, but it won't work in Access-less machines.
If you want to provide your user a Find and Replace feature, you'd manage to build your own one by queries. Anyway, it shouldn't be that hard.quote: ==> If I want to make this into a install package what is the procedure to do tat?
By 'this' do you mean the. mdb file? So, you just add it to the package creation project.
Or did you mean the whole VB project, in poor words 'how can I create a setup package'? This case, it depends on the tool you choose to work with.
You know, creation of a setup package it's not necessary, but is the simpler way to distribute your apps. The package creation tool manages all the DLLs/OCXs the project depends on, and allow developers to add some other files that they decide to include, such as your .mdb file.
There are many setup creation tools: the most common is the Package and Deployment Wizard (PDW), that's shipped with VB, but I prefer Visual Studio Installer (VSI) that creates smaller files and is more flexible. If you decide to try it, you have to download it by MS site. Both these are free. There are also some commercial ones, the most popular is InstallShield, but if I were you I'd wait to buy a commercial product.
In this forum we have discussed the 'installer' question several times, so if you search for 'installer' by site's search form, you'll get many useful threads to read.
quote: ...lots of questions even after getting so much help...
ehehehe...you're learning fast, isn't it? Well, you can't find better tutorial than striving to do a thing.
PS: again about Access distribution: I heard about MSDE but I don't know exactly what it is and does, nor if it could match your goal (so I beg other gurus opinions), as I never had the need to distribute any Access internal function before, Maybe you can have a look on it...
____________________________
Real Programmer can count up to 1024 on his fingers
|
|
18-09-2004 at 02:36 PM |
|
|
|
|
 |
 |