My record in this program isn't working at all.
VB Code:
Private Sub Form_Load() Data(0).DateForm = "frmLoad" Data(0).TodayMonth = "January" Data(0).TodayMonthNum = 1 Data(0).TodayDay = 1 Call CleanDateLoad If Data(0).TodayMonth = "December" Then cmdNext.Enabled = False If Data(0).TodayMonth <> "January" Then cmdPrev.Enabled = True Call MonthCalcDates 'This is here while I work out how to save files 'This allows me to not have to register each time i run the program With CustomerInfo(1) .ContactAreaCode = "01273" .ContactPhoneNumber = "418377" .County = "East Sussex" .Email = "" .HouseNumber = 5 .Name = "Adam Swann" .password = "password" .Postcode = "BN3 8LA" .StreetName = "Dale View" .username = "zbo" End With Data(0).TotalUsers = 1 'Change this when i know how to save files 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:
Private Sub cmdLogIn_Click() Dim Contiune As Boolean Dim index As Integer Dim username As String Dim password As String index = 0 Contiune = False username = txtUserName.Text password = txtPassword.Text Do While Contiune = False index = index + 1 If UCase(Trim(CustomerInfo(index).username)) = UCase(Trim(username)) Then Continue = True End If If index = 1092 Then MsgBox ("The user name you enterd doesn't exsit, please re-enter it") txtUserName.Text = "" txtPassword.Text = "" Exit Sub End If Loop If password = (RTrim(LTrim(CustomerInfo(index).password))) Then frmBooking.Show Unload Me Else MsgBox ("The password you enterd was incorrect, please re-enter it") txtPassword.Text = "" End If 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:
Public Type CustomerInfoType username As String * 15 password As String * 15 Name As String * 40 Email As String * 50 ContactAreaCode As String * 5 ContactPhoneNumber As String * 6 HouseNumber As Integer StreetName As String * 30 County As String * 30 Postcode As String * 8 End Type 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




Reply With Quote