Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Interactive search with Combobox
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Divers
Thread ID:
01449332
Message ID:
01449343
Vues:
37
>>I have the user select the type of data search that he wants to do from a dropdown listbox.
>>
>>The choices are:
>>
>>FirstName + Last Name
>>FirstName
>>Ref #
>>
>>I have a method of doing searches that works just fine with character type data in the Interactive event, but when I tried the sme on an Integer field, it bombed out.
>>
>>I know that I cannot do the search on Integer Type Data in the InteractiveChange event, but how do I then jump to a search in the LostFocus whn my entire search setup is in the InteractiveChange event?
>>
>>My intent was to do incremental searches, as the person keys in the information to search on.

>Are you using it on a combobox? How then your combo is set up?

Here's the code in the ComboBox InterActviveChange Event:
WITH ThisForm
	DO CASE
		CASE This.ListIndex = 1		&& LASTNAME+FIRSTNAME
			WAIT WINDOW NOWAIT "Setting Order to LastName + FirstName...You may do a Compound Search on Last and First Names."
			SET ORDER TO LFNAME
			.txtSearchBy.MaxLength  = LEN(A_INMA.LastName) +LEN(A_INMA.FirstName)
			
		CASE This.ListIndex = 2		&& FirstName
			WAIT WINDOW NOWAIT "Setting order to First Name"
			SET ORDER TO FirstName
			.txtSearchBy.MaxLength = LEN(FirstName)

		CASE This.ListIndex = 3		&& Reference #
			WAIT WINDOW NOWAIT "Setting order to REF..."
			SET ORDER TO REF
			.txtSearchBy.MaxLength = 6	&& LEN(REF)
			SET STEP ON

	ENDCASE
ENDWITH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform