14. april 2008 - 07:50Der er
4 kommentarer og 1 løsning
Tidspunkt med milisekunder
Jeg har brug for at kunne finde et tidspunkt helt ned til milisekunder, men det synes jeg ikke lige jeg kan få Access til at gøre. Hvad er det jeg misser?
Hos Computerworld it-jobbank er vi stolte af at fortsætte det gode partnerskab med folkene bag IT-DAY – efter vores mening Danmarks bedste karrieremesse for unge og erfarne it-kandidater.
A basic for next loop - on my computer it changes like the seconds
Maybe this is a new Access 2007 feature - on the MAC it also only changes once pr. sec. In the helpfile example they also use the timer to count seconds.
This is taken from Access help which confirms your theory about the mac
Access 2007 Developer Reference > Visual Basic for Applications Language Reference > Visual Basic Language Reference > Functions
Timer Function
Returns a Single representing the number of seconds elapsed since midnight.
Syntax
Timer
Remarks
In Microsoft Windows the Timer function returns fractional portions of a second. On the Macintosh, timer resolution is one second.
Example This example uses the Timer function to pause the application. The example also uses DoEvents to yield to other processes during the pause.
Dim PauseTime, Start, Finish, TotalTime If (MsgBox("Press Yes to pause for 5 seconds", 4)) = vbYes Then PauseTime = 5 ' Set duration. Start = Timer ' Set start time. Do While Timer < Start + PauseTime DoEvents ' Yield to other processes. Loop Finish = Timer ' Set end time. TotalTime = Finish - Start ' Calculate total time. MsgBox "Paused for " & TotalTime & " seconds" Else End End If
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.