Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Show/Hide Form vs. Form Visible:True/False

NorthNone (Programmer) (OP)
2 Apr 04 9:34
When to use Show Form and Hide Form? When should you use form visible = true and form visible = false instead?
Details: my application has one central form. Users can get to a second pop-up form by clicking on a command button. It was kind of slow opening and closing this second form over the network once the db was fully loaded with data, so I decided to load the second form when it is first requested, thereafter I hide it when the user clicks my close button and redisplay it when they asked for it again. Currently I am using visible: true/false.
Should I use Show/Hide instead? What are the arguments each way?
Thanks and a star for assistance!
JSouth
P.S. Actually I have seven of these forms users can click to get to, but it was easier to write in the singular. Anyway I don't want to preload all the subforms on startup since users may not use them all.

---------------------------------------
The customer may not always be right, but the customer is always the customer.

RoyVidar (Instructor)
2 Apr 04 10:03
Hi!

I think the frm.Show and frm.Hide methods are used in userforms (Word/Excel) and not in Access forms. As I've understood it, the visible false/true are the Access equivalence of frm.show/frm.hide

For speed and efficiency, there are alot of interesing stuff around, here are some:

Microsoft Access Performance FAQ
Making Access Faster - 168 Tips to Speed Up Your Apps!

And this thread from here (Name AutoCorrect ++) Thread702-206410.

Please don't offer stars as "payment" in your question. The stars are a way of telling the person(s) answering that their answers where helpful. Also providing means for members to see if the thread contains useful information when they search etc...

Roy-Vidar
NorthNone (Programmer) (OP)
2 Apr 04 11:12
There is a Hide and a Show method for forms in Access. From Access VBA Help:
Hide Method  
Hides an object but doesn't unload it.
Syntax
object.Hide
The object placeholder represents an object expression that evaluates to an object in the Applies To list. If object is omitted, the UserForm with the focus is assumed to be object.
Remarks
When an object is hidden, it's removed from the screen and its Visible property is set to False. A hidden object's controls aren't accessible to the user, but they are available programmatically to the running application, to other processes that may be communicating with the application through Automation, and in Windows, to Timer control events.
When a UserForm is hidden, the user can't interact with the application until all code in the event procedure that caused the UserForm to be hidden has finished executing.
If the UserForm isn't loaded when the Hide method is invoked, the Hide method loads the UserForm but doesn't display it.

---------------------------------------
The customer may not always be right, but the customer is always the customer.

jksmi (TechnicalUser)
2 Apr 04 11:32
Hi, I reckon Hide/Show are there for compatability as VB6 and most VBA apps use this syntax for hiding showing dialog boxes; rather than visible. Access has its own version of VBA which I think used to only include visible...
RoyVidar (Instructor)
2 Apr 04 16:24
What version are you using? Does the .Show/.Hide methods work on Access Forms too in that version?

I know they work on UserForms, as I use that in Word and Excel, but did a little test now, on my versions of Access (97 thru xp) but they didn't work there.

Roy-Vidar
jksmi (TechnicalUser)
5 Apr 04 6:52
Hi,

RoyVidar, sorry your right - I knew I'd used it recently in Access but it was controlling balloon help.

I think maybe, NorthNone, this came up in help as it applies to another library referenced in your project - if you look at the Object Browser there's no show/ hide methods for any Access objects in v2000 either...
NorthNone (Programmer) (OP)
5 Apr 04 7:42
Egg on my face :-(
I was certain I had used show/hide in another Access project successfully but didn't check my work before posting this question. I could have saved us all a lot of work if I had. It uses visible true/false, not show/hide.
Hats off and apologies to RoyVidar and jksmi...

---------------------------------------
The customer may not always be right, but the customer is always the customer.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close