JavaToPerlNowVB
Programmer
Hi Everyone
I have this code in a form, and I want to run few queries before the report grab data from those queries. I am not sure, if i should do docmd.openquery "queryName" but this way the query will open for the user and i don't want that to happen.
Thanks for all the help -
I have this code in a form, and I want to run few queries before the report grab data from those queries. I am not sure, if i should do docmd.openquery "queryName" but this way the query will open for the user and i don't want that to happen.
Code:
Private Sub workDonePoles_Click()
On Error GoTo Err_workDonePoles_Click
Dim stDocName As String
Dim stLinkCriteria As String
'I want to run the query here
DoCmd.Echo True, "Preparing Report...Please Wait"
stDocName = "completedWorkPole"
DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria
Exit_workDonePoles_Click:
Exit Sub
Err_workDonePoles_Click:
MsgBox Err.Description
Resume Exit_workDonePoles_Click
End Sub
Thanks for all the help -