troubleshooting Question

Access 2003 Run time error 3075 Unknown

Avatar of MSALLC
MSALLC asked on
Microsoft Access
15 Comments2 Solutions840 ViewsLast Modified:
In the code below case 1 and 2 are working as they should. When I make the report selection from my option group to run case 3 I get "Run-time error 3075 unknown". When I go to the code and check the values for some reason the acViewPreview = 2 when it should be option 3. The strWhere and cboSelectMFG have the correct value. What could I be doing wrong?

Private Sub cmdPreviewReport_Click()
    Dim strWhere As String
    Dim varWhere As Variant
    Select Case Me!OptPrint
        Case 1
            strWhere = "JN='" & Me.cboSelectJob & "'"
            DoCmd.OpenReport "rptByJob", acViewPreview, WhereCondition:=strWhere
        Case 2
            varWhere = "PurchaseOrderID=" & Me.cboSelectPONum
            DoCmd.OpenReport "rptByPONum", acViewPreview, WhereCondition:=varWhere
        Case 3
            strWhere = "MN='" & Me.cboSelectMFG & "'"
            DoCmd.OpenReport "rptByMFG", acViewPreview, WhereCondition:=strWhere
    End Select
End Sub

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 15 Comments.
Start Free Trial
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 2 Answers and 15 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