Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace at 2 table
Message
From
08/03/2006 08:43:40
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01102356
Message ID:
01102397
Views:
26
hi,

it works now as under,
but still i need your way.
IF act_flag="2"
     GO BOTTOM
      LOCATE FOR UPPER(shipno) =alltrim(thisform.text1.Value) AND    act_flag="2"
        IF!FOUND()
           MESSAGEBOX("Not Found")
        ELSE
        
        Select (cAlias)
           scan
               DELETE FOR UPPER(shipno) =alltrim(thisform.text1.Value) AND  act_flag="2"
           endscan
        Append from dbf('csrMyCursor') for !empty(bookno) 
              * for !empty(bookno) or !empty(sticket)  OR !empty(eticket)
        SCAN FOR UPPER(shipno) =alltrim(thisform.text1.Value) AND  act_flag="2"
               REPLACE  recevied WITH thisform.text8.Value,rdate WITH thisform.text9.value
                     with thisform.combo1
                           REPLACE storid WITH .List(.ListIndex,2)
                     ENDWITH
                      with thisform.combo2
                           REPLACE GAMENO WITH .List(.ListIndex,2)
                     ENDWITH
       endscan
 
 
                       IF USED('game')
                           SELECT game
                                 ELSE
                         SELECT 0
                            USE game AGAIN && 
                       ENDIF
                         USE game
                     with thisform.combo2
                       replace balance1 WITH balance1 +thisform.text2.value FOR gameno=thisform.combo2.List(.ListIndex,2)
                     ENDWITH
 
 ENDIF

 ENDIF 
 
  With thisform.grid1
   .recordsource = ''
   thisform.text1.SetFocus
   thisform.refresh
  endwith  
 
  **********************
  with thisform.Grid1
 .Recordsource = .Recordsource
endwith
thanks
>Well, I'd suggest you tidy up your code in a similar fashion before posting it, so we can read it more easily, not forgeting the PRE, /PRE directives, which keep the code looking as you meant it to look.
>
>BTW, FYI the word "grate" is an iron grill where you would have a fire. The word you want is "great", pronounced the same but meaning very good, as in "Allah akhbar" :-)
>
>>hi,
>>
>>this is a grate code,
>>
>>i' ll try to use it as a grate idea.
>>
>>but now how i can use it with my crazy code,
>>
>>just how i can replace at the second table(game)
>>
>>becuse i need it .
>>
>>thanks
>>
>>>Well like (ex):
>>>
>>>If XXXX
>>>    SCAN
>>>      If YYYYY
>>>         Do while ZZZZ
>>>           If AAAAA
>>>               Line of code 10
>>>           EndIf
>>>         EndDo
>>>      Else
>>>          Line of code 1
>>>          Line of code 2
>>>          Line of code 3
>>>          Line of code 4
>>>      EndIf
>>>    EndSCAN
>>>Else
>>>    Line of code 5
>>>    Line of code 6
>>>    Line of code 7
>>>    Line of code 8
>>>    Line of code 9
>>>Endif
>>>
>>>Then it's a lot easier to understand, rather than all over the place as you presented it, where first one has to sort out the indentation and follow the logic before one can decypher and understand the code
>>>
>>>>T.
>>>>how do you do it.
>>>>>M.
>>>>>
>>>>>I wouldn't even attempt to follow the logic in the crazy indentation you've provided.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform