|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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- |
|
#3
|
||||
|
||||
|
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 |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > On Activate Event procedure |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|