473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Make a Subform visible then invisible on timer event.

I want to hide a subform for 15 minutes, then have the form display for 30 seconds, then go away, then cycle again in 15 Minutes and on and on so every 15 minutes it is visible for 30 seconds. I'm already using the on Timer event for the main form that this SF is on.

On a side note, the whole purpoe of this is to get a pop up message to appear for 30 seconds, every 15 minutes, then go away on its own without interupting what the user is doing, so that they don't have to click anything to make the popup go away and it also doesn't move the focus off the main form that they are entering data on. That's why I used a sub form. I'm really stuck on how to do this. Thanks for your help!
Mar 17 '11 #1
6 4832
TheSmileyCoder
2,322 Expert Mod 2GB
In your timer event, you can set the timer value, thus swithcing between the 2 events.
Expand|Select|Wrap|Line Numbers
  1. If Me.Timer=15*60*100 then '15 minutes
  2.   'Show form
  3.   me.SubFrm.Visible=True
  4.   Me.Timer  =30*100 '30 seconds
  5. Else
  6.   'Hide Form
  7.   me.SubFrm.Visible=false
  8.   Me.Timer=15*60*100'15 minutes
  9. End If
Mar 17 '11 #2
NeoPa
32,556 Expert Mod 16PB
I believe the hundreds (100) in the code should be thousands (1000). The Timer intervals are measured in miliseconds. Also I believe the event property should be the .TimerInterval rather than the .Timer one. Just a few details. Otherwise it should do a nice job for you.
Mar 20 '11 #3
TheSmileyCoder
2,322 Expert Mod 2GB
You are absolutely correct. I probably shouldn't post when I am that tired. I have posted the corrected code below:
Expand|Select|Wrap|Line Numbers
  1. If Me.TimerInterval=15*60*1000 then '15 minutes 
  2.   'Show form 
  3.   me.SubFrm.Visible=True 
  4.   Me.TimerInterval=30*1000 '30 seconds 
  5. Else 
  6.   'Hide Form 
  7.   me.SubFrm.Visible=False 
  8.   Me.TimerInterval=15*60*1000 '15 minutes 
  9. End If 
  10.  
Thank you for picking up on my slack.
Mar 21 '11 #4
NeoPa
32,556 Expert Mod 16PB
More than happy with you pulling so much weight Smiley :-)
Mar 21 '11 #5
Thank YOu both for your replies and VERY helpful information. As always, it worked like a charm! :)
Mar 23 '11 #6
NeoPa
32,556 Expert Mod 16PB
Very pleased to hear it Jim :-)
Mar 23 '11 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: PCB | last post by:
Hi all, Not sure if this is possible, but can I change the controls of a command button on a per record bases in a subform. In my case, I would like to make a command button visible only if...
2
by: Marksmanaz | last post by:
I have a form named with a subform named based on a query with two controls called (text) and (Yes/No Checkbox). When the checkbox value is yes another query filters for Available Counselors...
3
by: Susan Bricker | last post by:
Greetings. I have three forms that are open at the same time. They are related and cascading. The first form (frmEventAdd) is the anchor. Each event can have many Trials. The second form is...
9
by: Tolga Tanriverdi | last post by:
I wrote a program which includes a timer event in it but if my program executes on windows 98 the timer event is not running is something like that possible Thanks
5
by: Bruce W.1 | last post by:
My datagrid displays just fine. When I click on a row it posts back but I can't seem to catch the event to do anything. My handler never gets called. Can anyone please tell me why? In the...
6
by: Selden McCabe | last post by:
I have a form with a bunch of image buttons. When the user moves the mouse over a button, I want to do two things: 1. change the Imagebutton's picture, and 2. make another control visible. I'm...
4
by: NH | last post by:
Hi, I just cannot get this to work. I want to make a cell editable in a datagrid only if the value of another cell is something specific. I am able to capture the value of the other cell via the...
3
by: kev | last post by:
Hello, I posted a question a while ago on tabbed pages, how to set it to invisible when the text box is empty.It was answered by Rick and the code ran perfectly. However, i tried using the same...
4
by: chris | last post by:
Can some one tell me the code required to do the following: When my form called Welcome opens I want one text field to be visible for 5 seconds, then i want to make another field visible for 5...
4
jo3n
by: jo3n | last post by:
I know I saw it here last week but can't locate it now. What is the syntax/settings for making fields in a form (subform) visible/invisible based on a combo box?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.