>>>Hi all,
>>>
>>>I've got a dropdown list whose recordsource is a SQL statement (type 3). It creates a cursor (contact names) which is used for the list. I'm allowing the users to enter another form to add a new contact.
>>>
>>>What I need to do is once they've added a new record in my table being used in the SQL statement and return to the main form, is 'rerun' the SQL statement in the recordsource to update the list.
>>>
>>>Where/how can I do this??
>>>
>>>mtia!
>>>
>>>Mandy
>>Mandy,
>>After new entry call ...mylist.requery
>>cetin
>
>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