473,387 Members | 1,903 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,387 software developers and data experts.

Delay form

Anyway to have a switchboard form open about 10 seconds after the
database comes up? Right now it opens when the database starts up but
now I need the switchboard form to open about 10 seconds after the
Access 2000 database starts up.

I assume I am looking for some sort of delay on the form onload?

I entered this using the design view properties in the form on load
event area:

Private Sub Form_Load()
StartTime = Now()
Do While Now() > StartTime + 10
' Do Something here to eat up a bit of time
StartTime = StartTime + 1
StartTime = StartTime - 1
Loop
End Sub
The above didnt work. There must be a way to make this work? Please
advise.
Nov 13 '05 #1
2 3993
Mark,

Your code will never work ...
Your loop is immediately done. StartTime + 10 is ten days later than Now() . . .
I would try something like this if you want to delay your form:

Dim lngTimer as lomg
LngTimer=Timer()
Do until Timer() > lngTimer +10
Loop
'Code will continue after 10 seconds here
DoWhatYouNeedHere

If you need to use a autoexec-macro you will need to call a function like:

Function autoexec(0
LngTimer=Timer()
Do until Timer() > lngTimer +10
Loop
'Code will continue after 10 seconds here
Docmd.OpenForm "YourSwitchboard"
--
Hope this helps
Arno R


"Mark" <te****@hotmail.com> schreef in bericht
news:49**************************@posting.google.c om...
Anyway to have a switchboard form open about 10 seconds after the
database comes up? Right now it opens when the database starts up but
now I need the switchboard form to open about 10 seconds after the
Access 2000 database starts up.

I assume I am looking for some sort of delay on the form onload?

I entered this using the design view properties in the form on load
event area:

Private Sub Form_Load()
StartTime = Now()
Do While Now() > StartTime + 10
' Do Something here to eat up a bit of time
StartTime = StartTime + 1
StartTime = StartTime - 1
Loop
End Sub
The above didnt work. There must be a way to make this work? Please
advise.

Nov 13 '05 #2
thanks, it now works!
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dennis C. Drumm | last post by:
Using the Win API to play a sound with the code below in my Windows Form application. I get a huge delay (seems like application is hanging) just prior to the sound being played each time. Is this...
6
by: Trevor Hardwick | last post by:
Hi I'm Delay Signing an assembly. The Register for Com Interop property is set to true for all output files. When I build the solution I get the following error: "COM Interop registration...
7
by: mfeingold | last post by:
I am working on a system, which among other things includes a server and a ..net control sitting in an html page and connected to the server. I ran into a couple of problems, you guys might have...
14
by: Rene Grothmann | last post by:
I have managed to communicate between forms and Java applets. A button press sends the content of the text area to an applet, a second button gets some text from the applet and puts it into the...
2
by: WhatHappend | last post by:
I have converted a .Net 1.0 application to .Net 2.0 and the web service invocations have delay of around 10seconds on each intial access. After the first access subsequent access are fast (After a...
4
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I make a 10 second delay? ----------------------------------------------------------------------- There...
3
by: virtualgreek | last post by:
Dear all, I have a scenario that is driving me nuts. (MS Access 2003) I have a form/subform (Continuous form) where it gets its data from tables Order and Order_Details. In the footer...
2
by: Rahina | last post by:
I am working in Dreamweaver 8, and I have created a simple form: http://www.realmofmystery.com/app.html This is a free website I am doing for some friends, so nothing fancy. And, I learned web...
6
by: sheldonlg | last post by:
I came across a problem and googling for an answer didn't help. What I want to do is run an AJAX script that sets a hidden variable on the form. I call the AJAX script from a javascript...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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:
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.