J
Jack W via AccessMonster.com
Hi,
I have a button I press to run a query. If I want to filter the records say
for [Date] in the query to =date(), where do I add that in the VBA code to
Open the query with criteria that is not built into the query? (reason being,
then I could make multple buttons with their own criteria rather than
multiple queries...
Private Sub todaysbalances_Click()
On Error GoTo Err_todaysbalances_Click
Dim stDocName As String
stDocName = "qrySearchData"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_todaysbalances_Click:
Exit Sub
Err_todaysbalances_Click:
MsgBox Err.Description
Resume Exit_todaysbalances_Click
End Sub
Any ideas?
I have a button I press to run a query. If I want to filter the records say
for [Date] in the query to =date(), where do I add that in the VBA code to
Open the query with criteria that is not built into the query? (reason being,
then I could make multple buttons with their own criteria rather than
multiple queries...
Private Sub todaysbalances_Click()
On Error GoTo Err_todaysbalances_Click
Dim stDocName As String
stDocName = "qrySearchData"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_todaysbalances_Click:
Exit Sub
Err_todaysbalances_Click:
MsgBox Err.Description
Resume Exit_todaysbalances_Click
End Sub
Any ideas?