I am trying to right a loop that tests whether a text box integer value and a command button event click are false before executing the body of the loop. Problem is that I can't get my head round the cast issue. See below code any assistance would be appreciated:
Private Sub Photoset_PID_Exit(Cancel As Integer)
Do Until (Me.txt_RGC_box_position > 9) Or (cmd_CloseLoggingBox.OnClick())
DoCmd.GoToRecord , , acNewRec
'reset controls to null values
Me!Photoset_PID = ""
Me!txt_InfiniteCounter = ""
Loop
MsgBox "Time to do some Validation"
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_Validation"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec
'reset controls to null values
Me!Photoset_PID = ""
Me!txt_InfiniteCounter = ""
End Sub
Private Sub Photoset_PID_Exit(Cancel As Integer)
Do Until (Me.txt_RGC_box_position > 9) Or (cmd_CloseLoggingBox.OnClick())
DoCmd.GoToRecord , , acNewRec
'reset controls to null values
Me!Photoset_PID = ""
Me!txt_InfiniteCounter = ""
Loop
MsgBox "Time to do some Validation"
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_Validation"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec
'reset controls to null values
Me!Photoset_PID = ""
Me!txt_InfiniteCounter = ""
End Sub