Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it possible to insert checkbox in the header?
Message
De
17/02/2009 16:28:44
Joel Leach
Memorial Business Systems, Inc.
Tennessie, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01382434
Message ID:
01382490
Vues:
136
This message has been marked as the solution to the initial question of the thread.
>>Works perfectly with small problem.
>>Can't find Function GoRec

Oops! I didn't realize I used that function. I will fix it on my blog, but the function is below.

>I tried to use HeaderClass for the column, but then I got an error when I tried to run the form.

This VFP9 SP2 bug may apply to you: If you open this form from the menu, you have to use the menu “Procedure” to open the form instead of “Command”. Otherwise, VFP9 will crash when you open the form.
* GOREC.prg
* Restore record number
* lcAlias is optional
* lcFailCode is optional, indicates where to go (TOP,BOTTOM) if record number can't be restored)
Lparameters lnRecNo, lcAlias, lcFailCode
Local llEof

If Empty(lcAlias)
	lcAlias = Alias()
EndIf

If lnRecNo>Reccount(lcAlias)
	llEof = .t.
EndIf

If lnRecNo<>0 and lnRecNo<=Reccount(lcAlias)
	Go lnRecNo in (lcAlias)
Else
	DO case 
	Case llEof	&& restore at end of file
		Go Bottom in (lcAlias)
		If !Eof(lcAlias)
			Skip in (lcAlias)
		Endif
	Case Empty(lcFailCode)
		* Record pointer stays put
	Case Upper(lcFailCode) = "T"	&& Top
		Go Top in (lcAlias)
	Case Upper(lcFailCode) = "B"	&& Bottom
		Go Bottom in (lcAlias)
	Otherwise
		* Record pointer stays put
	EndCase
EndIf
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform