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!

.Visable help needed 1

Status
Not open for further replies.

dgirl1010

Technical User
Jul 14, 2006
20
0
0
US
I have a form to detect idle time and close a db after a certain amount of time has been reached. It is launched at startup and hidden from the user. In order to close the form the user must enter a password.

If the user hits cancel on the password prompt, I want to close the password prompt and rehide the detect idle time form, but I'm getting an error that says, "Application-defined or object-defined error"

This is my code, line two is where I get the error when I debug:
Code:
Private Sub cmd_Cancel_Click()
[COLOR=red]Forms!DetectIdleTime.Visable = False[/color]
DoCmd.Close acForm, "PasswordPrompt"
 
[blush] Hmmm, weeeelll, that does work better...
 
Thanks Skip, I did a debug/compile and it didn't catch it. :?
 



Shows you ALL the alligators in the swamp!

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Some thing I noticed when typing in the code window to use only lowercase for properties like .enabled, .visible, docmd, acform etc..

It will automatically change them to proper style (.Enabled, .Visible.DoCmd, acForm ). Not changing means typed is not correct.

________________________________________________________
Zameer Abdulla
Help to find Missing people
Take the first step in faith. You don't have to see the whole staircase, just take the first step.
(Dr. Martin Luther King Jr.)
 
Yes, that's why I always use mixed case for my variable names. I usually catch misspellings as soon as I hit ENTER.


 
You might consider Option Explicit, then the debug will catch these sort of misspellings.

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top