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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Record

Status
Not open for further replies.

BF

Programmer
Feb 13, 2000
10
0
0
CA
Visit site
I have a form based on a query. The query is based on two tables in a one to many relationship. I added some code to the &quot;On Delete&quot; event that looks up some criteria in the query and if it meets the criteria it allows a delete of the current record. My problem is when I go back to the form it deleted the record but did not advance the record. I just show the word &quot;deleted&quot; in each control. I'm struggling on how to move the record forward with code. <br>
<br>
Thanks <p>BF<br><a href=mailto:g43@tc3net.com>g43@tc3net.com</a><br><a href= > </a><br>
 
Normally you would execute a MoveNext/Move Previous after a Delete. Is this not possible, or am I not understanding your situation?<br>
<br>
Larry Woods
 
If your form contains a list box you can issue a DoCmd.Requery &quot;Listbox_name&quot;. You can also requery the Listbox_name directly by using Listbox_name.requery.<br>
<br>
e.g. Forms!Employees!EmployeeList.requery<br>
either of these can be added after the recored has been deleted.
 
The Form uses a query for its Recordset. I'm using code in the &quot;On Click&quot; event that opens another dynaset off the same query. How do I keep the form records and this new Recordset in sync when I cycle through the new query. <p>BF<br><a href=mailto:g43@tc3net.com>g43@tc3net.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top