My record in this program isn't working at all.

VB Code:
  1. Private Sub Form_Load()
  2.  
  3.     Data(0).DateForm = "frmLoad"
  4.     Data(0).TodayMonth = "January"
  5.     Data(0).TodayMonthNum = 1
  6.     Data(0).TodayDay = 1
  7.     Call CleanDateLoad
  8.     If Data(0).TodayMonth = "December" Then cmdNext.Enabled = False
  9.     If Data(0).TodayMonth <> "January" Then cmdPrev.Enabled = True
  10.     Call MonthCalcDates
  11.    
  12.     'This is here while I work out how to save files
  13.     'This allows me to not have to register each time i run the program
  14.     With CustomerInfo(1)
  15.         .ContactAreaCode = "01273"
  16.         .ContactPhoneNumber = "418377"
  17.         .County = "East Sussex"
  18.         .Email = ""
  19.         .HouseNumber = 5
  20.         .Name = "Adam Swann"
  21.         .password = "password"
  22.         .Postcode = "BN3 8LA"
  23.         .StreetName = "Dale View"
  24.         .username = "zbo"
  25.     End With
  26.    
  27.     Data(0).TotalUsers = 1 'Change this when i know how to save files
  28. End Sub

Here you can see that I've added the record under the user name zbo, but here when i search for it

VB Code:
  1. Private Sub cmdLogIn_Click()
  2.     Dim Contiune As Boolean
  3.     Dim index As Integer
  4.     Dim username As String
  5.     Dim password As String
  6.     index = 0
  7.     Contiune = False
  8.     username = txtUserName.Text
  9.     password = txtPassword.Text
  10.  
  11.     Do While Contiune = False
  12.         index = index + 1
  13.         If UCase(Trim(CustomerInfo(index).username)) = UCase(Trim(username)) Then
  14.             Continue = True
  15.         End If
  16.        
  17.         If index = 1092 Then
  18.             MsgBox ("The user name you enterd doesn't exsit, please re-enter it")
  19.             txtUserName.Text = ""
  20.             txtPassword.Text = ""
  21.             Exit Sub
  22.         End If
  23.     Loop
  24.    
  25.     If password = (RTrim(LTrim(CustomerInfo(index).password))) Then
  26.         frmBooking.Show
  27.         Unload Me
  28.     Else
  29.         MsgBox ("The password you enterd was incorrect, please re-enter it")
  30.         txtPassword.Text = ""
  31.     End If
  32. End Sub

it says that the user name dosn't exsit. but it clearly is under CustomerInfo(1) heres the modual incase thiers a problem with that.

VB Code:
  1. Public Type CustomerInfoType
  2.     username As String * 15
  3.     password As String * 15
  4.     Name As String * 40
  5.     Email As String * 50
  6.     ContactAreaCode As String * 5
  7.     ContactPhoneNumber As String * 6
  8.     HouseNumber As Integer
  9.     StreetName As String * 30
  10.     County As String * 30
  11.     Postcode As String * 8
  12. End Type
  13. Public CustomerInfo(1 To 1092) As CustomerInfoType

So can anyone see any problems with this code?

I can't uplaod any forms as when i click the 'Manage attachments' button i don't get anything up, just a blank window. in fact that happens when ever i open a new webpage.


Cheers,
Ichar