PC Review


Reply
Thread Tools Rate Thread

Hiding a Form (Completely) A97

 
 
Kahuna
Guest
Posts: n/a
 
      20th Feb 2007
Hi Folks - been one of those days... Code which worked beautifully yesterday
is now broken (I broke it - obviously lol)!!!

I am using a form to open initially on load of my app - as a Start-Up form -
just running set-up code. Upto today it was closed by the splash form, after
it'd done the job, but now I want to leave it open to use as a timer.

Seems like Forms![frmStartup].Hide (from the SplashForm Load) should hide
the form but it errors with object not defined error. The form remains as a
grey box even if set to Me.Visible = False?

Any suggestions gratefully received.

--
Kahuna
------------


 
Reply With Quote
 
 
 
 
Rick Brandt
Guest
Posts: n/a
 
      20th Feb 2007
Kahuna wrote:
> Hi Folks - been one of those days... Code which worked beautifully
> yesterday is now broken (I broke it - obviously lol)!!!
>
> I am using a form to open initially on load of my app - as a Start-Up
> form - just running set-up code. Upto today it was closed by the
> splash form, after it'd done the job, but now I want to leave it open
> to use as a timer.
> Seems like Forms![frmStartup].Hide (from the SplashForm Load) should
> hide the form but it errors with object not defined error. The form
> remains as a grey box even if set to Me.Visible = False?
>
> Any suggestions gratefully received.


Forms![frmStartup].Visible = False

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


 
Reply With Quote
 
Kahuna
Guest
Posts: n/a
 
      20th Feb 2007
Tried that Rick - but for some reason it leaves a Grey Box on the main
background.

The only workaround I have so far is to close the frsmStartUp form and
reopen it with

DoCmd.OpenForm "frmStartup", acNormal, , , acFormEdit, acHidden. This seems
to be working but my concern is that its too sloppy!

frmStartUp is opened as the first when running the app, using the display
form element of the Access start-up settings.

Is there anyway to have this form open hidden from there?

--
Kahuna
------------
"Rick Brandt" <(E-Mail Removed)> wrote in message
news:9FHCh.26067$(E-Mail Removed)...
> Kahuna wrote:
>> Hi Folks - been one of those days... Code which worked beautifully
>> yesterday is now broken (I broke it - obviously lol)!!!
>>
>> I am using a form to open initially on load of my app - as a Start-Up
>> form - just running set-up code. Upto today it was closed by the
>> splash form, after it'd done the job, but now I want to leave it open
>> to use as a timer.
>> Seems like Forms![frmStartup].Hide (from the SplashForm Load) should
>> hide the form but it errors with object not defined error. The form
>> remains as a grey box even if set to Me.Visible = False?
>>
>> Any suggestions gratefully received.

>
> Forms![frmStartup].Visible = False
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt at Hunter dot com
>



 
Reply With Quote
 
Rick Brandt
Guest
Posts: n/a
 
      21st Feb 2007
Kahuna wrote:
> Tried that Rick - but for some reason it leaves a Grey Box on the main
> background.
>
> The only workaround I have so far is to close the frsmStartUp form and
> reopen it with
>
> DoCmd.OpenForm "frmStartup", acNormal, , , acFormEdit, acHidden. This
> seems to be working but my concern is that its too sloppy!
>
> frmStartUp is opened as the first when running the app, using the
> display form element of the Access start-up settings.
>
> Is there anyway to have this form open hidden from there?


Have you tried coding...

Me.Visible = False

....in the form's Open or Load event?

You could also remove it from the startup properties and open it hidden from an
AutoExec macro. (any macro named "AutoExec" will fire when the file is opened).

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


 
Reply With Quote
 
Kahuna
Guest
Posts: n/a
 
      21st Feb 2007
That's what I tried Rick - it eaves a grey square (in the shape of the small
form) attribute on the screen.

--
Kahuna
------------
"Rick Brandt" <(E-Mail Removed)> wrote in message
newsILCh.65160$(E-Mail Removed)...
> Kahuna wrote:
>> Tried that Rick - but for some reason it leaves a Grey Box on the main
>> background.
>>
>> The only workaround I have so far is to close the frsmStartUp form and
>> reopen it with
>>
>> DoCmd.OpenForm "frmStartup", acNormal, , , acFormEdit, acHidden. This
>> seems to be working but my concern is that its too sloppy!
>>
>> frmStartUp is opened as the first when running the app, using the
>> display form element of the Access start-up settings.
>>
>> Is there anyway to have this form open hidden from there?

>
> Have you tried coding...
>
> Me.Visible = False
>
> ...in the form's Open or Load event?
>
> You could also remove it from the startup properties and open it hidden
> from an AutoExec macro. (any macro named "AutoExec" will fire when the
> file is opened).
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt at Hunter dot com
>



 
Reply With Quote
 
Rick Brandt
Guest
Posts: n/a
 
      21st Feb 2007
Kahuna wrote:
> That's what I tried Rick - it eaves a grey square (in the shape of
> the small form) attribute on the screen.


I have never seen that upon hiding a form. Perhaps you have a video driver
issue.

Anyway, did you try the AutoExec Macro? While macros are generally frowned upon
the AutoExec and AutoKeys macros have legitimate uses. With AutoExec you can
have it run a single command "RunCode". That way you are still doing everything
in VBA. You are just using AutoExec to fire it.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


 
Reply With Quote
 
Kahuna
Guest
Posts: n/a
 
      21st Feb 2007
I've not tried the AutoExec Rick since (as you said) I know its frowned
upon!

I am going to try it on another PC to see what happens - but the challenge
is if it happens here (driver defect or not) its possible to happen on a
clients desk - so its essential to fix it. It's working right now with my
close / open hidden workaround.

I'll trial it and see which way works best (stay away from the macro if
possible).

Cheers Rick - you must be driven crazy with all this support stuff - do you
sleep at all? lol.

--
Kahuna
------------
"Rick Brandt" <(E-Mail Removed)> wrote in message
news:2YWCh.13027$(E-Mail Removed)...
> Kahuna wrote:
>> That's what I tried Rick - it eaves a grey square (in the shape of
>> the small form) attribute on the screen.

>
> I have never seen that upon hiding a form. Perhaps you have a video
> driver issue.
>
> Anyway, did you try the AutoExec Macro? While macros are generally
> frowned upon the AutoExec and AutoKeys macros have legitimate uses. With
> AutoExec you can have it run a single command "RunCode". That way you are
> still doing everything in VBA. You are just using AutoExec to fire it.
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt at Hunter dot com
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Completely Hiding Access =?Utf-8?B?cm95X3dhcmU=?= Microsoft Access VBA Modules 12 16th Dec 2005 04:11 AM
Eventargs from one form is a control on a completely different form vMike Microsoft ASP .NET 0 23rd Jan 2004 08:09 PM
Getting rid of the mouse! (hiding it completely) Michael Windows XP General 1 30th Sep 2003 02:14 AM
Trouble opening one form and closing or hiding the calling form David Hearn Microsoft Dot NET Compact Framework 3 27th Sep 2003 01:25 AM
Re: completely hiding XP desktop icon text anchorboi Windows XP Customization 0 3rd Jul 2003 05:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:48 PM.