Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 06-10-2019, 04:44 AM   #1
whwmsj
Newly Registered User
 
Join Date: Jun 2019
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
whwmsj is on a distinguished road
On Deactivate

Newbie with basic experience here, go easy on me please...

I have a main form with a macro button that calls a second form which has a button that calls a third form. Each form overlaps the previous form.

I'd like to "gray out" each form on deactivate, but want it to remain visible and in the stack of forms. In other words, visually, the form on top with the focus appears to have the focus and all other do not. Once the current form is closed, I'd like the immediate form below it in the stack to change back from being grayed out to normal and have the focus.

Any and all help is greatly appreciated.

Bill.

whwmsj is offline   Reply With Quote
Old 06-10-2019, 04:54 AM   #2
theDBguy
I’m here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 4,839
Thanks: 50
Thanked 1,103 Times in 1,084 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: On Deactivate

Hi Bill. Welcome to the forum. I am thinking maybe you can use a global array to store the names of the forms as you open them in order. This will help tell you which form to activate as each form is closed and its name is removed from the list.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 06-10-2019, 05:09 AM   #3
whwmsj
Newly Registered User
 
Join Date: Jun 2019
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
whwmsj is on a distinguished road
Re: On Deactivate

Quote:
Originally Posted by theDBguy View Post
Hi Bill. Welcome to the forum. I am thinking maybe you can use a global array to store the names of the forms as you open them in order. This will help tell you which form to activate as each form is closed and its name is removed from the list.

Thank you for the welcome and response. Is there an "easier" way? Such as in the form's property sheet in Deactivate, simple code like Docmd… change background to Red? again, newbie here with minimal VBA experience.

Thanks,
Bill.

whwmsj is offline   Reply With Quote
Old 06-10-2019, 05:33 AM   #4
gemma-the-husky
Super Moderator
 
gemma-the-husky's Avatar
 
Join Date: Sep 2006
Location: UK
Posts: 13,769
Thanks: 55
Thanked 1,022 Times in 988 Posts
gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all
Re: On Deactivate

do you not get a different appearance when you select a form at the moment?
__________________
Dave (Male!)
Gemma was my dog

if a poster helps you, please click the scales at the bottom left of this posting, or use the thanks button alongside.
gemma-the-husky is offline   Reply With Quote
Old 06-10-2019, 06:14 AM   #5
whwmsj
Newly Registered User
 
Join Date: Jun 2019
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
whwmsj is on a distinguished road
Re: On Deactivate

Quote:
Originally Posted by gemma-the-husky View Post
do you not get a different appearance when you select a form at the moment?
No. But, that's what I'm looking for.
whwmsj is offline   Reply With Quote
Old 06-12-2019, 06:20 PM   #6
missinglinq
AWF VIP
 
missinglinq's Avatar
 
Join Date: Jun 2003
Location: Richmond (Virginia that is!)
Posts: 6,300
Thanks: 11
Thanked 716 Times in 666 Posts
missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light
Re: On Deactivate

Quote:
Originally Posted by whwmsj View Post

...Is there an "easier" way? Such as in the form's property sheet in Deactivate, simple code like Docmd… change background to Red...]
Sure...on each appropriate Form simple use:

Code:
Private Sub Form_Activate()
 Me.Detail.BackColor = vbBlue
End Sub

Private Sub Form_Deactivate()
  Me.Detail.BackColor = vbRed
End Sub
substituting your own preferred colors.

Linq ;0)>
__________________
The Devil's in the Details!
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


(All code solutions tested in Access 2003/2007, before posting, unless otherwise noted.)
missinglinq is offline   Reply With Quote
The Following User Says Thank You to missinglinq For This Useful Post:
whwmsj (06-13-2019)
Old 06-13-2019, 12:14 PM   #7
whwmsj
Newly Registered User
 
Join Date: Jun 2019
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
whwmsj is on a distinguished road
Re: On Deactivate

Quote:
Originally Posted by missinglinq View Post
Sure...on each appropriate Form simple use:

Code:
Private Sub Form_Activate()
 Me.Detail.BackColor = vbBlue
End Sub

Private Sub Form_Deactivate()
  Me.Detail.BackColor = vbRed
End Sub
substituting your own preferred colors.

Linq ;0)>

Exactly what I was looking for. Thank you kindly!

whwmsj is offline   Reply With Quote
Old 06-13-2019, 04:41 PM   #8
missinglinq
AWF VIP
 
missinglinq's Avatar
 
Join Date: Jun 2003
Location: Richmond (Virginia that is!)
Posts: 6,300
Thanks: 11
Thanked 716 Times in 666 Posts
missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light
Re: On Deactivate

Glad we could help!

Good luck with your project!

Welcome to Access World!

Linq ;0)>

__________________
The Devil's in the Details!
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


(All code solutions tested in Access 2003/2007, before posting, unless otherwise noted.)
missinglinq is offline   Reply With Quote
Reply

Tags
change form appearance , deactivate

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Deactivate Page Down Key DBFIN Forms 1 05-22-2013 04:50 PM
‘Deactivate’ the Navigation Pane mlr Forms 6 05-24-2011 07:43 AM
deactivate notification anzacks Queries 1 03-20-2008 08:58 PM
deactivate check box on subform scratch Forms 0 06-14-2006 11:18 AM
Is it possible to "deactivate" a report control? RedSkies Reports 2 04-25-2001 12:27 PM




All times are GMT -8. The time now is 08:40 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World