Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seek
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Seek
Miscellaneous
Thread ID:
00895885
Message ID:
00901431
Views:
22
Jojo:

Your code is difficult to read the way you posted it.Please always use < pre > and < /pre > tags for code as I did below.

>The reason why I issue a "go top" is base on my previous codes, I cannot seek records when I issue set order to tag "TAGName" (not in the datasession) without issueing go top.
>Please do correct any unnecessary commands on my code below..
>
>This is coded under valid procedure of my form...


Whithout knowing much about the application this would be a first pass...
xcust_id = alltrim(this.value)
With thisform
   If not empty(xcust_id)
      set exact on
      Select ffcust
      Set order to custid
      If Seek(xcust_id)
         lget = .f.
         .txtcompany.value = Custname
         .txtcontact.value = contname
         *.txtpostcode.value = postcode
         .txtaddress.value = address
         .txtcity.value = city
         .txtcountry.value = country
         .txtoff_tel.value = tel
         .txtext.value = " "
         .txtmobile.value = ""
         .txtemail.value = email
         *xcust_id = .txtcust_id.value
         * some code block
         *
      else
         Messagebox("Customer Id not Found!",0+64,"Record Search",1500)
         IF messagebox("Do you want to add now?",4+32+512,"New Customer")=6
            do form new-ffscustomers with xCust_id
         ELSE
            lAppend = .F.
         Endif
      Endif
   Endif
EndWith
If empty(xcust_id)
   keyboard Chr(32)
   lseek = .t.
   Do form forms\sele-fcust
Endif


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform