Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date Filter on Form doesn't work properly
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Date Filter on Form doesn't work properly
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01461572
Message ID:
01461572
Vues:
207
I have a method called SetDateFilter at the form-level which doesn't work correctly; it looks okay, but doesn't do the job. It filters out all of the data, no matter what the Dates are. The user enters a date range, a FROM date and a THRU date. The table's name is QUOTES. The field in question is called "dQuote" for the data of the Quote. When I use this and give a range of known good records, the table goes to EOF, which isn't quite what I was looking for. And, sometimes I get an error message on my variable below called "dThru".

Here's my code:
WITH ThisForm
	IF NOT EMPTY(.txtDateFrom.Value) AND ;
			NOT EMPTY(.txtDateThru.Value)
		dFrom = CTOD(.txtDateFrom.Value)
		dThru = CTOD(.txtDateThru.Value)
		SET FILTER TO BETWEEN(Quotes.dQuote, dFrom, dThru)
		GO TOP
		.Refresh()
	ENDIF
ENDWITH
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform