Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 4th, 2004, 06:33 AM
makekee makekee is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: zimbabwe
Posts: 2 makekee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
On Activate Event procedure

I have a vb code i need to paste to the On Activate Event procedure in my access database and i do not know how to go about it. Please help.


Private Sub Form_Activate()

'When the database is opened display welcome user message.
'When the timer interval is reached, this form closes and opens Switchboard

If Time() < 0.5 Then
[lblMorning].Visible = True
[lblAfternoon].Visible = False
[lblEvening].Visible = False

ElseIf Time() > 0.5 And Time() < 0.75 Then
[lblMorning].Visible = False
[lblAfternoon].Visible = True
[lblEvening].Visible = False

ElseIf Time() > 0.75 Then
[lblMorning].Visible = False
[lblAfternoon].Visible = False
[lblEvening].Visible = True
End If
End Sub

Reply With Quote
  #2  
Old February 4th, 2004, 10:39 AM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 12
When looking at your from in design view,
Display the properties dialog box,
Make sure is says Form in the header of the proerpties dialog box,
Click on the event tab,
Scroll to the top till you see Activate
Click next to activate
Click on the ... in the box to the right of activate
select code

that past the following code


'When the database is opened display welcome user message.
'When the timer interval is reached, this form closes and opens Switchboard

If Time() < 0.5 Then
[lblMorning].Visible = True
[lblAfternoon].Visible = False
[lblEvening].Visible = False

ElseIf Time() > 0.5 And Time() < 0.75 Then
[lblMorning].Visible = False
[lblAfternoon].Visible = True
[lblEvening].Visible = False

ElseIf Time() > 0.75 Then
[lblMorning].Visible = False
[lblAfternoon].Visible = False
[lblEvening].Visible = True
End If






S-

Reply With Quote
  #3  
Old February 4th, 2004, 10:50 AM
supersubra's Avatar
supersubra supersubra is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Coimbatore, India
Posts: 280 supersubra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 15 m 10 sec
Reputation Power: 6
Set the Timer Interval property of form to 10000 for (10 seconds) and paste the following code in FormTimerevent.

Private Sub Form_Timer()
DoCmd.Close
docmd.openform "SwitchBoard"
End Sub

Above code will keep the welcome screen for 10 seconds and afterwards it will close and open the switchboard.

But check the vb code you have written.
__________________
V.Subramanian

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > On Activate Event procedure


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT