Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I need totals for each.....
Message
 
 
À
06/05/2008 14:10:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01312769
Message ID:
01315402
Vues:
23
>O.K. here comes the code for password.scx: I will rename again I was trying to work with what I had.
>
>
>**************************************************
>*-- 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 cboUsername 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 = "cboUsername"
>
>
>	ADD OBJECT cmdCancel AS commandbutton WITH ;
>		Top = 120, ;
>		Left = 227, ;
>		Height = 25, ;
>		Width = 66, ;
>		Caption = "Cancel", ;
>		Name = "cmdCancel"
>
>
>	ADD OBJECT cmdOk AS commandbutton WITH ;
>		Top = 120, ;
>		Left = 142, ;
>		Height = 25, ;
>		Width = 66, ;
>		Caption = "OK", ;
>		Name = "cmdOk"
>
>
>	ADD OBJECT txtPassword AS textbox WITH ;
>		Value = "", ;
>		Format = "", ;
>		Height = 23, ;
>		InputMask = "", ;
>		Left = 123, ;
>		Top = 70, ;
>		Width = 100, ;
>		PasswordChar = "*", ;
>		Name = "txtPassword"
>
>
>	PROCEDURE Load
>		THISFORM.Icon ="LOCATION.ICO"
>	ENDPROC
>
>
>	PROCEDURE cmdCancel.Click
>		release thisform
>	ENDPROC
>
>
>	PROCEDURE cmdOk.Click
>			if Seek(rtrim(thisform.cboUsername.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
>
>Fred

Hi Fred,

I made some changes here directly (renaming buttons, textboxes, combobox). You don't want to bind Password to the table, I think. Otherwise I don't understand what the form is supposed to do.

I also don't think you need combobox for the users (I would just use unbound textbox so users will type UserID), but that's up to you.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform