Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / July 2007

Tip: Looking for answers? Try searching our database.

close form automatically after say 2 second

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Song Su - 06 Jul 2007 03:34 GMT
I guess I cannot close msgbox after predetermined time in code. So I want to
use a form to display message and close automatically in 2 seconds. How to
do that?

Thanks.
SteveM - 06 Jul 2007 03:48 GMT
Check the Access help for the OnTimer event.

Steve

> I guess I cannot close msgbox after predetermined time in code. So I want to
> use a form to display message and close automatically in 2 seconds. How to
> do that?
>
> Thanks.
Song Su - 06 Jul 2007 03:55 GMT
These code works. How to supply message to the form in code?

Option Compare Database
Option Explicit

Private Sub Form_Open(Cancel As Integer)

   Me.TimerInterval = 2000

End Sub

Private Sub Form_Timer()
DoCmd.Close acForm, "Form1"
End Sub

> Check the Access help for the OnTimer event.
>
[quoted text clipped - 7 lines]
>>
>> Thanks.
SteveM - 06 Jul 2007 13:36 GMT
If you supply a value for the OpenArgs when calling the form, you can set a
textbox to equal the value of OpenArgs.

Code to call form:
DoCmd.OpenForm "Form1",,,,,, "Message to display"

Then in the OnOpen event of Form1:
Me.Field = Me.OpenArgs

Steve

> These code works. How to supply message to the form in code?
>
[quoted text clipped - 22 lines]
> >>
> >> Thanks.
Song Su - 06 Jul 2007 14:34 GMT
Thank you. I'll try that.

> If you supply a value for the OpenArgs when calling the form, you can set
> a
[quoted text clipped - 36 lines]
>> >>
>> >> Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.