Rick B
Feb 13th, 2000, 04:00 AM
Can anyone tell me why the first Else doesn't ever seem to be true. My program keeps ignoring it.
Select Case Data1.Recordset.EditMode
Case dbEditNone ' No edit taking place, just handle Navigation
If (lngTotal_Records > 2) Then
If (Data1.Recordset.BOF) Or (Data1.Recordset.AbsolutePosition = 0) Then
NavigateButtons ("0011110101")
ElseIf (Data1.Recordset.EOF) Or (Data1.Recordset.AbsolutePosition = _
lngTotal_Records) - 1 Then
NavigateButtons ("1100110101")
Else ' THIS ELSE WILL NOT RUN FOR SOME REASON
NavigateButtons ("1111110101")
End If
ElseIf (lngTotal_Records > 0) Then
NavigateButtons ("0000110101")
Else
NavigateButtons ("0000100001")
End If
If (Not IsMissing(blnLockEm)) Then
LockTheControls (blnLockEm)
End If
Case dbEditInProgress ' We are editing the current record
Call LockTheControls(False)
TxtBx1(1).SetFocus
NavigateButtons ("0000001010")
Case dbEditAdd ' We are adding a record
Call LockTheControls(False)
TxtBx1(1).SetFocus
NavigateButtons ("0000001010")
End Select
Select Case Data1.Recordset.EditMode
Case dbEditNone ' No edit taking place, just handle Navigation
If (lngTotal_Records > 2) Then
If (Data1.Recordset.BOF) Or (Data1.Recordset.AbsolutePosition = 0) Then
NavigateButtons ("0011110101")
ElseIf (Data1.Recordset.EOF) Or (Data1.Recordset.AbsolutePosition = _
lngTotal_Records) - 1 Then
NavigateButtons ("1100110101")
Else ' THIS ELSE WILL NOT RUN FOR SOME REASON
NavigateButtons ("1111110101")
End If
ElseIf (lngTotal_Records > 0) Then
NavigateButtons ("0000110101")
Else
NavigateButtons ("0000100001")
End If
If (Not IsMissing(blnLockEm)) Then
LockTheControls (blnLockEm)
End If
Case dbEditInProgress ' We are editing the current record
Call LockTheControls(False)
TxtBx1(1).SetFocus
NavigateButtons ("0000001010")
Case dbEditAdd ' We are adding a record
Call LockTheControls(False)
TxtBx1(1).SetFocus
NavigateButtons ("0000001010")
End Select