Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interactive search with Combobox
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01449332
Message ID:
01449346
Views:
42
>>>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
>
So, the code seems OK to me - what is the problem?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform