Refresh Subform from Main form button

E

Emma Aumack

Hi all,

Here is my problem:

I am trying to clear the contents of a subform as follows:

Private Sub Cmd_ClPriceAprvl_Click()
On Error GoTo Err_Cmd_ClPriceAprvl_Click

Dim stDocName As String

stDocName = "Qry_MyPriceAprvl_Flush"
DoCmd.OpenQuery stDocName, acNormal, acEdit

Exit_Cmd_ClPriceAprvl_Click:
Exit Sub

Err_Cmd_ClPriceAprvl_Click:
msgbox Err.Description
Resume Exit_Cmd_ClPriceAprvl_Click

Forms!Frm_MyPriceApproval.Requery

End Sub

Frm_MyPriceApproval data is coming from a table (tbl_MyPriceApvl) where data
from another query is appended. I have tried requery and refresh and neither
works. What am I doing wrong?

Thanks
 

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