none
Repeat the answer in a search vfp RRS feed

  • Question

  • Hi

    I have a problem in the search is done well but the problem of repeating the wrong answer please help and thank you

    This code

    set exact on

    SET FILTER TO

     THISFORM.list1.VISIBLE = .T.

     THISFORM.list1.ROWSOURCE = ''

    SELECT A.ITEM_ID,A.ITEM_NM,b.price_1,B.ITEM_ID ;

           FROM INV_M1 A, INV_M2 B ;

           ORDER BY ITEM_NM;

          WHERE LOWER(ALLTRIM(item_nm)) like "%"+lower(ALltRIM(thisform.text1.Value))+ "%";

    INTO CURSOR TMP

     THISFORM.list1.ROWSOURCETYPE= 6

     THISFORM.list1.columncount = 3

     THISFORM.list1.rowsource  = "TMP"

    THISFORM.REFRESH

     thisform.refresh

     thisform.activate**

    Saturday, January 12, 2019 9:23 AM

Answers

  • Hi abdoh9

    Combo-/Listboxes aren't refreshed. They have to be 'Requeried' to show their current content.

    So... add a

         Thisform.list1.Requery

    instead of your

         Thisform.Refresh
         Thisform.Refresh
         Thisform.Activate

    and everything should be fine.


    Gruss / Best regards
    -Tom
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible,
    you are, by definition, not smart enough to debug it. 010101100100011001010000011110000101001001101111011000110110101101110011

    • Marked as answer by abdoh9 Sunday, January 20, 2019 10:44 PM
    Saturday, January 12, 2019 1:25 PM
    Moderator

All replies

  • Hi abdoh9

    Combo-/Listboxes aren't refreshed. They have to be 'Requeried' to show their current content.

    So... add a

         Thisform.list1.Requery

    instead of your

         Thisform.Refresh
         Thisform.Refresh
         Thisform.Activate

    and everything should be fine.


    Gruss / Best regards
    -Tom
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible,
    you are, by definition, not smart enough to debug it. 010101100100011001010000011110000101001001101111011000110110101101110011

    • Marked as answer by abdoh9 Sunday, January 20, 2019 10:44 PM
    Saturday, January 12, 2019 1:25 PM
    Moderator
  • Thanks very much for the help reply
    I'm beginning to learn Fox I hope I work hard in the future and learn a lot of my presence with you in this site
    In fact, I need help in correcting the form. I will send you a form. Please contact me, fix the problem of multiple search, or display the search in more than one grid. If the search is selected, the item is displayed in another 1 grid table and the request is displayed in grid2.
    Please communicate with me on the email and download the form with the data and fix the problem and send back the email correction sql
    Thank you so much I'll be glad to get the answer
    Thanks

    Abdoh

    link problem cod  

    https://drive.google.com/open?id=1ek6j3HRBskb4tBuBgtBdWRFsSeerWPwN

    • Edited by abdoh9 Sunday, January 13, 2019 10:32 PM
    Sunday, January 13, 2019 10:24 PM
  • Hi Abdoh,

    I think you expect more from these forums than what they are designed for. The help you receive in the forums is done by the free will and free time by volunteers. I think it's presumptuous  to expect people to go and download code and then spend time correcting it. Did you try to apply advice from Tom to your code?


    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles

    Sunday, January 13, 2019 10:37 PM
    Moderator
  • thank you very much for the respond
    I sent in some forums my problem did not answer any one I have sent more than one person in two months did not receive an answer
    Thank you very much for helping and interacting with me
    abdoh
    Tuesday, January 15, 2019 7:17 PM
  • The best way to get an answer here is to ask a very clear, very specific question, and to tell us what you've already tried and why it's not working. We're all volunteers and can only give so much of our time to help others.

    Tamar

    Tuesday, January 15, 2019 9:21 PM
    Moderator
  • This site is not only useful for finding points
    Wednesday, January 23, 2019 11:31 PM