Hi,
I am trying to pass the form filter (region) through to a query that is triggered by a button on the form. Right now the query prompts me for the filter value again. Here' the code that I have.
Private Sub UpdateInvButton_Click()
On Error GoTo Err_UpdateInvButton_Click
Dim stDocName As String
stDocName = "qryUpdateMainCost"
DoCmd.OpenQuery stDocName, acViewNormal, acEdit
Exit_UpdateInvButton_Click:
Exit Sub
Err_UpdateInvButton_Click:
MsgBox Err.Description
Resume Exit_UpdateInvButton_Click
End Sub
Any help would be much appreciated. Thanks,
Dolores
I am trying to pass the form filter (region) through to a query that is triggered by a button on the form. Right now the query prompts me for the filter value again. Here' the code that I have.
Private Sub UpdateInvButton_Click()
On Error GoTo Err_UpdateInvButton_Click
Dim stDocName As String
stDocName = "qryUpdateMainCost"
DoCmd.OpenQuery stDocName, acViewNormal, acEdit
Exit_UpdateInvButton_Click:
Exit Sub
Err_UpdateInvButton_Click:
MsgBox Err.Description
Resume Exit_UpdateInvButton_Click
End Sub
Any help would be much appreciated. Thanks,
Dolores