How to refresh a subform' records

  • Thread starter Thread starter Dou
  • Start date Start date
D

Dou

After I have deleted a record on the subform. I can't show other records.
How to refresh it and can show other records.

thanks
 
if you delete the record using a button on the main form then the right
syntax will be me.subformname.requery

if you delete by selecting a record and then press delete then it should do
the requery for you.
if the requery doesnt help you then explain how you trying to delete.
 
Like this:

With Me![OrderAddSubform].Form
If .NewRecord Then
Beep
Else
.RecordsetClone.Bookmark = .Bookmark
.RecordsetClone.Delete
Me![OrderAddSubform].Requery
End If
End With

After execute these code, can delete the selected record, but other record
cann't be shown.
 
I see you had that post before, if your mdb is small try and mail it to
(e-mail address removed)

I'll have a look

Dou said:
Like this:

With Me![OrderAddSubform].Form
If .NewRecord Then
Beep
Else
.RecordsetClone.Bookmark = .Bookmark
.RecordsetClone.Delete
Me![OrderAddSubform].Requery
End If
End With

After execute these code, can delete the selected record, but other record
cann't be shown.



Ofer said:
if you delete the record using a button on the main form then the right
syntax will be me.subformname.requery

if you delete by selecting a record and then press delete then it should do
the requery for you.
if the requery doesnt help you then explain how you trying to delete.
 
I have solved this problem. thanks.

Ofer said:
I see you had that post before, if your mdb is small try and mail it to
(e-mail address removed)

I'll have a look

Dou said:
Like this:

With Me![OrderAddSubform].Form
If .NewRecord Then
Beep
Else
.RecordsetClone.Bookmark = .Bookmark
.RecordsetClone.Delete
Me![OrderAddSubform].Requery
End If
End With

After execute these code, can delete the selected record, but other record
cann't be shown.



Ofer said:
if you delete the record using a button on the main form then the right
syntax will be me.subformname.requery

if you delete by selecting a record and then press delete then it
should
do
the requery for you.
if the requery doesnt help you then explain how you trying to delete.

:

After I have deleted a record on the subform. I can't show other records.
How to refresh it and can show other records.

thanks
 
Back
Top