Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with SEEK routine
Message
From
02/09/1999 17:53:31
 
 
To
02/09/1999 16:25:13
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00260836
Message ID:
00260879
Views:
11
>I have a form that has a text field for the user to input a client id. Once the ID is entered, the VALID method searches the CLIENT file for a matching record and displays the clientname. Because the CLIENT table is set up to be alphabetical via an index for another portion of the form, I needed to create a seperate SEEK routine to do the search..
>
>Like the best laid plans, the customer has switched what they want. There are 2 "firms" in the customers office and clients are assigned to one or the other firm. This assignment (via an ID) is also in the client file.
>
>The client wants to select the appropriate FIRM to work with on the form and when the client ID # is entered, only those clients that are assigned to THAT firm are searched.
>
>Here is the original routine I wrote... now it needs to be modified to check the FIRMID and if it is not correct, look for the next match to the clientID, check, continue, etc. (By the way, also per the customer, their can be duplicate client id #'s, 1 per firm. Great)
>
>IF this.tag <> this.value and !ISBLANK(this.value) ;
> and !ISNULL(this.value)
> IF Seek(This.value,'client','clientnum')
> Thisform.pageframe1.page1.cbClient.Value=client.clientid
> this.tag=this.value
> return 1
> else
> Messagebox("Client number not found",48,"ERROR")
> return 0
> endif
>endif
>
>
>What should I use to seek out the NEXT match on the clientnum? Thanks

Build a compound index that is FirmId + ClientId.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform