Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing tables from .mdb to a VB project? 1

Status
Not open for further replies.

jhowley58

Programmer
Jun 25, 2001
207
0
0
US
Hi,
I posted this originally on the VB forum and got a pointer to a link but the tool was no longer available..so:

Is there any way of importing Forms etc from a Ms Access .mdb file into a VB project?

I need to hide the Ms Access tables from certain operators so I want to give them a VB generated front end with a subset of the original forms as opposed to exposing the Ms Access DB to them.

Thanks,

John

 
I would steer clear of any tool that says it can convert Access forms to VB, for a few reasons. Mostly it's the subform issue--VB has no direct corresponding substitue, and there is much code involved in making dbGrids behave as Access subforms.

The way to do this is to use the same .mdb, but create an Access.Application Object within a VB app, then call that Access object and from VB you can hide the App but show just a single Access Form.

This has the screen appearance such that it looks as though that form is floating on the screen and not within an Access interface. No taskbar Access icon is there, and no tables, forms, or other objects are viewable or tinker-able, it's all totally restricted from any fiddling by anyone. Way better security than an .MDE or trying to convert existing forms, reports, etc. All reports, etc. work identically as they would from Access standalone.

I have done this on some fairly involved Access apps, and it is not a problem performance-wise. The Application can be the Access Front-End, and all the Front-End's calls to it's Access (or any odbc) backend are dealt with from the front-end itself--ie you don't even need to know about the backend in your VB app.
--jsteph
 
Thanks jsteph,

I'll try that asap and post the result.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top