I wish to have a cmdbutton (cmdAddNewEntry) disabled when the NextNum = 1 (NextNum is a textbox on the current form) and enabled when NextNum <>1.
Below is my code & I am not sure why it keeps locking up on me.
Private Sub Form_Current()
Do
Do While Me.NextNum = 1
If Me.NextNum = 1 Then
Me.cmdAddNewEntry.Enabled = False
Else
Me.cmdAddNewEntry.Enabled = True
Exit Do
End If
Loop
Loop Until Me.NextNum <> 1
Below is my code & I am not sure why it keeps locking up on me.
Private Sub Form_Current()
Do
Do While Me.NextNum = 1
If Me.NextNum = 1 Then
Me.cmdAddNewEntry.Enabled = False
Else
Me.cmdAddNewEntry.Enabled = True
Exit Do
End If
Loop
Loop Until Me.NextNum <> 1