Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sort on Form Init
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Divers
Thread ID:
01366984
Message ID:
01367056
Vues:
7
Built in navigation buttons? All buttons I have used have been made by myself, but most of this database was built before I took over it. I'm not aware of any option to select an order. The recno() feature is how this search is designed to find the record to go to. Unfortunately the search is finding the order that I want, but it goes to the record number of the table order instead. Maybe it will help to show you this portion of the code.
thisform.txtLocate.Refresh
STORE ALLTRIM(UPPER(thisform.txtlocate.Value)) TO m.locatesw
STORE LEN(m.locatesw) TO m.leftnum
SELECT fac_mas
IF m.locatesw == ""
	messagebox('Please enter in an operator name or part of the operator name.', 16, 'BLANK ENTRY!')
ELSE
	LOCATE FOR UPPER(LEFT(operator, m.leftnum)) = m.locatesw
	IF FOUND()
		rec = RECNO()
		IF (rec <= RECCOUNT())
			IF (rec >= 1)
			MESSAGEBOX(rec)

				thisform.cmdback.enabled = .t.
				thisform.cmdbeg.enabled = .t.
				thisform.cmdforward.enabled = .t.
				thisform.cmdend.enabled = .t.

				IF (rec == 1)
					thisform.cmdback.enabled = .f.
					thisform.cmdbeg.enabled = .f.
				ENDIF

				IF (rec == RECCOUNT())
					thisform.cmdforward.enabled = .f.
					thisform.cmdend.enabled = .f.
				ENDIF
				mp = RECNO()- 1
				num = ((RECNO() * -1) + 1)
				SKIP num
				thisform.txtcount.value = rec
				SKIP mp
				thisform.refresh
				thisform.txtlocate.Value = " "
			ELSE
				messagebox('Invalid Record Number.', 64, 'REC UNDER')
				thisform.txtcount.value = Recno()
				thisform.txttotal.value = Reccount()
		
				IF (recno() == 1)
					thisform.cmdback.enabled = .f.
					thisform.cmdbeg.enabled = .f.
				ENDIF

				IF (recno() == RECCOUNT())
					thisform.cmdforward.enabled = .f.
					thisform.cmdend.enabled = .f.
				ENDIF
			ENDIF
		ENDIF
	ELSE
		MESSAGEBOX('Operator was not found!',16,'WAIT!')
		thisform.txtlocate.value = " "
		GO TOP
		thisform.txtcount.value = Recno()
		thisform.txttotal.value = Reccount()
		thisform.cmdback.enabled = .f.
		thisform.cmdbeg.enabled = .f.
		thisform.refresh
	ENDIF	
ENDIF
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform