Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to 'rerun' SQL statement Record Source?
Message
From
05/08/1998 13:53:07
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, United States
 
 
To
05/08/1998 13:45:22
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00124108
Message ID:
00124174
Views:
24
>>>Mandy,
>>>First of all never a pain. Many ways and places to do it in fact but for your detailed case it could be like this :
>>>
* Button.click (calling form2)
>>>..
>>>do form form2  && New contact added
>>>thisform.cmbATName.requery() && refresh list on return
Cetin
>>
>>I tried this by putting the following code in my FORM1 'Add a new contact' button's Click method:
>>
>>DO FORM addcont
>>*!* refresh lists on return
>>thisform.pfAgyCont.pContacts1.cmbATname.requery()
>>thisform.pfAgyCont.pContacts1.cmbCOname.requery()
>>thisform.pfAgyCont.pContacts1.cmbCPCname.requery()
>>
>>But the lists aren't being refreshed until I close the form and open it again. Any ideas where I can look to make this work? Never easy! ;) And I really appreciate your willingness to help!
>>
>>Mandy
>Mandy,
>Is table buffering on ? SQL would only show tableupdated ones.
>Cetin

Cetin,
Nope. There's no table buffering going on in my form or my table which is the source of the lists.

Don't know if this helps, but my lists use a field from some views (one view per list) and the SQL record source is:

SELECT trim(first)+" "+trim(middlei)+" "+trim(last) AS name, persid FROM Person WHERE acode=caid ORDER BY last INTO CURSOR cPerson

Any other thoughts? (other than telling my users to close and open the form whenever they add a new contact ;)..)

Mandy
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform