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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting Access To VB

Status
Not open for further replies.

menstroy

MIS
Jun 2, 2003
63
US
Hello,

I have a phonebook designed in access, everything is great.. It works just fine. However I dont like the way access opens it. I wanted to have it a small window so that it could be more usefull and act as a program would.

Is there a simple solution? I would like to have it open the form window and just show that and not have the access window around it...

I have VB but know very little about vb itself.. I know vba and have done a lot of learning with VBA.. I created a form in VB and compiled it as an EXE and this is exactly how I want my Access forms to look like.

Anyone have any suggestions? Is there a simple way to convert this to VB or can I have access not show the normal Access windows on the outside of the forms?
 
[tt]
Hi, Menstroy:

Open your db in the database view. Click on Tools -> Startup, and then remove the checkmark from Display Database Window.

HTH[/tt]

[glasses][tt]Gus Brunston - Access2000(DAO Intermediate skills.
Webmaster: www.rentdex.com[/tt]
 
I have tried that, but the inner window isnt resizing correctly... If i put a maximize command on form load it works fine but it still has the (square) resize button in the corner, and if that is pressed it looks all goofy..

I guess i'm just having problems with the way access displays forms etc
 
If you set up your references correctly, you can pretty much cut and paste your VBA code into VB. The catch is that all Access objects have to be converted into VB. Any forms and reports will have to be built from scratch and any calls to Docmd will have to be converted to lower level code. There are tools to speed up the process, google "Convert Access objects to VB" and you will see a bunch.
 
foolio12 - when you say 90% perfect, what are the deficiencies that you know of in the remaining 10%? The F11 issue can be dealt with in any one of several ways, and shutting down Access on application termination can also be taken care of fairly easily. Are there any other issues that you know of that require handling?

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Things like the F11 issue appear. If you 'hide' the window and press F11, you are presented with ... something akin to invisibility.

If you close down a form, and this does not close down the application, you are left with an invisible Access process running that you can't shut down short of the Task Manager.

You have to open all forms in popup mode. This goes for reports, too. Otherwise they'll be hidden as part of the Access window.



So, what I mean by 99% is that there are a lot of gotchas, and so long as you have simple needs, you'll be good. Turning an entire database application into 'invisible window mode' didn't work for me--and I don't even remember why anymore. Probably something about missing the default toolbars.
 
Where do I put the call to this function?

I made the form a popup, and in the on load event I have fSetAccessWindow (SW_HIDE) and i keep getting an error saying

"cannot hide Access unless a form is on screen"

if i put the call anywhere else it hides everything.

Thanks
 
I don't remember exactly, but try putting a

Me.Visible = True

line inside the Form_Load() event before you hide the Access window. I think that the form is invisible until after the Load event by default...not 100% on that.
 
I use this function in my application. It works well. It just takes some getting used to. It works 100 percent provided you follow the rules of use.

When to call the function?
I call the function with a popup form that opens in the start up of the program. I use a shortcut to open the program so that it opens the program minimized. The popup comes up, loads up the db and then i start from there.

Mark P.

Bleh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top