Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ado requery

  • Thread starter Thread starter member 472187
  • Start date Start date
Status
Not open for further replies.
M

member 472187

Guest
I have a form that on a command button opens a second form to add a new record, then on the update hides the add new form.

How/where do I perform a requery to force the recordset to recognize the new record. The only thing I have gotten working short of stopping and restarting the program is a requery button on the first form. I have tried on the close of the add button, form load of the first, lost and got focus of both and it doesn't perform the requery.
 
The recordset should recognize the new record. But are you using an object to read or display the recordset, such as a data control, ADODC or variable? If so then you will need to refresh the object.

zemp
 
No, I'm opening a new form to add the new record, saving it and closing the form and going back to the original form. I'm using ADO, no data control, ADOCD or a variable.
 
Is the same recordset being used on both forms or are you using two different recordsets?

zemp
 
The same recordset is used for both forms.
 
If the one recordset does not show the newly addred record (when you are back to the main form) you can try refreshing the recordset in the form Activate event. This works well if the addnew form is modal.


zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top