troubleshooting Question

Correct code placement

Avatar of SparkyP
SparkyP asked on
Microsoft Access
8 Comments1 Solution348 ViewsLast Modified:
I want to open a form, JobReports, from another form.

I have added a command button with the following code to filter records, but it does not seem to load efficiently.

I am putting the code in the correct place?

Private Sub OpenJobReports_Click()
DoCmd.OpenForm "JobReports"
Forms![JobReports].Filter = "[Status] = " & Chr(34) & "Completed" & Chr(34) & " OR  [Status] = " & Chr(34) & "In progress" & Chr(34)
Forms![JobReports].FilterOn = True
DoCmd.GoToRecord , , acLast
End Sub
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros