Can anyone help??
This code isn’t starting when it should and isn't stopping when it should and I can’t figure out why.
Private Sub Condition1_Click()
Dim Condition1 As Boolean
Do
DoCmd.OpenQuery "qGBX2b"
DoCmd.OpenQuery "qGBX2c"
DoCmd.OpenQuery "qGBX2d"
CurrentDb.Execute "ALTER TABLE GBX2Temp ALTER COLUMN Line COUNTER(1,1)"
DoCmd.Requery
Loop Until Condition1 = True
MsgBox "Done", vbDefaultButton1, "Done"
End Sub
It is run from a form, where a field is counting down and Condition1 is a field that changes to TRUE once it reaches a certain value.
As the code is above, it runs once and does not loop whilst the value of Condition1 is FALSE. If I change the Loop criteria to “Loop Until Condition1 = False”, it runs whilst the value is FALSE, but does not stop when it changes to True.
Where am I going wrong?