Click a command button to move to the next account number
which are held in strings from the database loading.
The code works but shows one blank before it returns to the
first account is there any way for it to move back to the first
account number if the str record is blank? and not show the blank.
which are held in strings from the database loading.
The code works but shows one blank before it returns to the
first account is there any way for it to move back to the first
account number if the str record is blank? and not show the blank.
Code:
VB6
Private Sub cmdNextAcc_Click()
Select Case True
Case Titles.strAccNum0 = txtAccount _
And Not Titles.strAccNum0 = vbNullString
txtAccount = Titles.strAccNum1
Case Titles.strAccNum1 = txtAccount _
And Not Titles.strAccNum1 = vbNullString
txtAccount = Titles.strAccNum2
Case Titles.strAccNum2 = txtAccount _
And Not Titles.strAccNum2 = vbNullString
txtAccount = Titles.strAccNum3
Case Titles.strAccNum3 = txtAccount _
And Not Titles.strAccNum3 = vbNullString
txtAccount = Titles.strAccNum4
Case Titles.strAccNum4 = txtAccount _
And Not Titles.strAccNum4 = vbNullString
txtAccount = Titles.strAccNum5
Case Titles.strAccNum5 = txtAccount _
And Not Titles.strAccNum5 = vbNullString
txtAccount = Titles.strAccNum0
Case Else
txtAccount = Titles.strAccNum0
End Select
End Sub