Next and Previous won't work after record is deleted

S

Stapes

Hi

I have a form which allows the user to search for duplicate compnay
details and merge and delete records which are duplicates. The merge
button opens a new form which does the job of moving all the child
records of the duplicate record before allowing the user to delete it.
When the user closes this form and returns to the calling form, all
the fields display "#deleted".
Now, when the user clicks on Next or Previous, I get an error message
- Record is deleted, and the next / previous record does not appear.
Is there any way round this?

Stapes
 
J

Jerry Whittle

You need to refresh the data in the calling form. You can do this manually by
going up to menu and selecting Records, Refresh. Give that a try and see if
it works.

If it does you could put some code in the 'merge' form that fires after the
records have been deleted. Something like below with the proper table name:

Forms!Calling.Requery
 
S

Stapes

You need to refresh the data in the calling form. You can do this manuallyby
going up to menu and selecting Records, Refresh. Give that a try and see if
it works.

If it does you could put some code in the 'merge' form that fires after the
records have been deleted. Something like below with the proper table name:

  Forms!Calling.Requery
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.







- Show quoted text -

Hi

I have done this. When I return to my calling form after performing
Form!Calling.Requery, it has returned to the beginning of the
recordset. However, it still allows me to goto where the missing
records is (the one I have just deleted). The fields all show
#Deleted. If I land on it whilst using any of the navigation controls
I get this run-time error '2427' ; You have entered an expression that
has no value.
 
J

Jerry Whittle

What happens when you do a manual refresh on the Calling form after deleting
records in the other?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top