Deleting records from a subform

M

Maracay

Hi Guys,

I have a form with a continuous form as sub form, in this subform I created
a check box to mark the records I want to delete, in the main form I created
a command button to deleted those records at the end I do Me.Requery, but the
problem is that in the subform in the record I deleted I got the word Deleted
in the line where previously were the records I deleted, I just want to know
if there is a way to refresh the form to just disappear the record.

Thank
 
D

Dirk Goldgar

Maracay said:
Hi Guys,

I have a form with a continuous form as sub form, in this subform I
created
a check box to mark the records I want to delete, in the main form I
created
a command button to deleted those records at the end I do Me.Requery, but
the
problem is that in the subform in the record I deleted I got the word
Deleted
in the line where previously were the records I deleted, I just want to
know
if there is a way to refresh the form to just disappear the record.


I just answered this exact same question yesterday for somebody else. The
answer is: don't requery the main form, requery the subform. You can do it
with a line of code like this:

Me.YourSubformName.Requery
 
M

Maracay

Thanks

Dirk Goldgar said:
I just answered this exact same question yesterday for somebody else. The
answer is: don't requery the main form, requery the subform. You can do it
with a line of code like this:

Me.YourSubformName.Requery


--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)
 

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