running forms on desktop

D

Dave Smith

hi all, i couldn't find an answer to this one, and i was hoping to run a
small phone no. database on my desktop, that is, without the Access Program
window in the background. So my 2 small forms would appear on the desktop
itself. i have Access 2003 and WinXp Sp2

thanks in advance

Dave
 
D

Dave Smith

hmm if i read it right i am to put this code in the 'On Open' event in the
properties box of my form? if so i cant seem to get it to work at all, i get
error messages saying only comments are allowed after the 'end function'
command, although there is nothing after the 'end function' command. i tried
removing the green text above and below the actual code, but no different.
hope im just doing something wrong?

thanks
 
D

Douglas J. Steele

No, you don't put the code into an event's Property box.

Create a new module (not a class module, nor a module associated with a
form), copy everything between "Code Start" and "Code End" from that page
and paste it into the module, then save the module. Make sure the name of
the module is something different than the name of any routines contained
within the module. Use "mdlSetWindow" to be certain (unless you've already
got a module with that name!)

You could simply set the Open property for the form to
=fSetAccessWindow(SW_HIDE), but I'd recommend setting it to Event Procedure,
and using VBA to call the function so that you can trap any errors that
might occur:

Private Sub Form_Open()
On Error GoTo Err_Form_Open

Call fSetAccessWindow(SW_HIDE)

End_Form_Open:
Exit Sub

Err_Form_Open:
MsgBox Err.Number & ": " & Err.Description
Resume End_Form_Open

End Sub
 
D

Dave Smith

ok, you have been really patient and i appreciate that :p, i did as you said
and it is trying to work. when i open my form, initially i got "cannot hide
Access UNLESS a form is on screen" so i made a switchboard and then i got
"Cannot hide Access with switchboard on screen", so i made a form with a
button that opens my "starting" form (the one with your code in the On Open
property) and then i get "Cannot hide Access WITH form on screen"

so i seem to be stuck...

thanks again...

Dave
 
D

Douglas J. Steele

Did you set the form's Popup property to True, like the article states is
required?
 
Top