grobermatic
Technical User
Hi, I'm using the following code but at the line where I've placed "***" it completely locks access up. I have to exit Access through the Task Manager. I need to be able to use the form from where the code was activated whist its running as its constantlyu checking the status of a control on a form.
Function Game1_Procedure()
Dim StartTime As Date
Dim EndTime As Date
Dim TotalTime As Date
Dim booFinished As Boolean
StartTime = TIME()
booFinished = False
Do Until booFinished = True
*** If Forms!frmGameBoard1![Box15].BackColor = 65280 Then
booFinished = True
Exit Do
End If
Loop
EndTime = TIME()
TotalTime = EndTime - StartTime
MsgBox TotalTime
End Function
(Please forgive the crudeness of my code as I am self taught and am fully aware that its not the prettiest code on the world!)
Any ideas why this happens
Thanks
Craig
Function Game1_Procedure()
Dim StartTime As Date
Dim EndTime As Date
Dim TotalTime As Date
Dim booFinished As Boolean
StartTime = TIME()
booFinished = False
Do Until booFinished = True
*** If Forms!frmGameBoard1![Box15].BackColor = 65280 Then
booFinished = True
Exit Do
End If
Loop
EndTime = TIME()
TotalTime = EndTime - StartTime
MsgBox TotalTime
End Function
(Please forgive the crudeness of my code as I am self taught and am fully aware that its not the prettiest code on the world!)
Any ideas why this happens
Thanks
Craig