>...
>>>Hi Cetin,
>>>
>>>I'm not sure where I do this. More info... I've got an "Add a new contact" button on FORM1 that calls FORM2 where the user adds a new contact record. Then FORM2's Save button releases FORM2, returning to FORM1. They're now back on my FORM1 with the dropdown lists having SQL statements querying CONTACTS.DBF as recordsources, one of which is named 'cmbATName' for example.
>>>
>>>Where do I run the requery? Sorry to be a pain ;)
>>>
>>>Mandy
>>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 :
>>
>>..
>>do form form2
>>thisform.cmbATName.requery()
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,
Try adding the statement
thisform.pfAgyCont.pContacts1.Refresh()
after your last Requery() statement to refresh the page on your pageframe. You *may* need to refresh each list separately, but I don't think so.
As an aside, you may find this style of coding executes faster:
WITH thisform.pfAgyCont.pContacts1
.cmbATname.requery()
.cmbCOname.requery()
.cmbCPname.requery()
.Refresh()
ENDWITH && thisform.pfAgyCont.pContacts1
Let us know if this helps...
Evan Pauley
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN
If a vegetarian eats vegetables, what does a humanitarian eat?