************************************************** *-- Form: form1 (c:\hprc\password.scx) *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 05/05/08 01:52:02 PM * DEFINE CLASS form1 AS form Top = 0 Left = 0 Height = 181 Width = 356 DoCreate = .T. Caption = "Password" WindowType = 1 Name = "form1" ADD OBJECT lblstrain1 AS stonelabel WITH ; FontName = "MS Sans Serif", ; FontSize = 9, ; Caption = "Name", ; Left = 28, ; Top = 23, ; Visible = .T., ; Width = 65, ; Name = "LBLSTRAIN1" ADD OBJECT stonelabel1 AS stonelabel WITH ; FontName = "MS Sans Serif", ; FontSize = 9, ; Caption = "Password", ; Height = 15, ; Left = 28, ; Top = 74, ; Visible = .T., ; Width = 81, ; Name = "Stonelabel1" ADD OBJECT username AS combobox WITH ; ColumnCount = 0, ; ColumnWidths = "", ; RowSourceType = 6, ; RowSource = "users.username", ; ControlSource = "Users.Username", ; FirstElement = 1, ; Height = 24, ; Left = 123, ; NumberOfElements = 0, ; Style = 2, ; Top = 18, ; Width = 100, ; Name = "Username" ADD OBJECT command1 AS commandbutton WITH ; Top = 120, ; Left = 227, ; Height = 25, ; Width = 66, ; Caption = "Cancel", ; Name = "Command1" ADD OBJECT command2 AS commandbutton WITH ; Top = 120, ; Left = 142, ; Height = 25, ; Width = 66, ; Caption = "OK", ; Name = "Command2" ADD OBJECT password AS textbox WITH ; Value = "", ; ControlSource = "Users.Password", ; Format = "", ; Height = 23, ; InputMask = "", ; Left = 123, ; Top = 70, ; Width = 100, ; PasswordChar = "*", ; Name = "Password" PROCEDURE Load THISFORM.Icon ="LOCATION.ICO" ENDPROC PROCEDURE command1.Click release thisform ENDPROC PROCEDURE command2.Click if Seek(rtrim(thisform.Username.value), 'Users','Username') if rtrim(Users.Password) = rtrim(thisform.txtPassword.value) * This is a valid user else * ? Is it possible to have multiple users with the same ID - should be not, use Candidate index (or Primary for this) * The password is not valid endif else * The User is not found endif DO FORM C:\HPRC\MANAGEMENT.SCX release thisform ENDPROC ENDDEFINE * *-- EndDefine: form1 **************************************************Thanks again A LOT