G
Guest
I'm trying to get a command button to go to a specific record in a report in
my DB when clicked. On the form where the command button is located is a
combo box that is populated by a query that returns all names of Sub Names
from a table. The name of my report is All Subs & the field in my report
where I want this info to come from is Sub Name. I get an error that says
this-"Run-time error '3075' Syntax error (missing operator) in query
expression '(Sub Name=Joes Desserts)' Here is my code...
Option Compare Database
Option Explicit
Private Sub Command4_Click()
DoCmd.OpenReport "All Subs", acViewPreview, , "Sub Name=" & Me.Combo0
End Sub
my DB when clicked. On the form where the command button is located is a
combo box that is populated by a query that returns all names of Sub Names
from a table. The name of my report is All Subs & the field in my report
where I want this info to come from is Sub Name. I get an error that says
this-"Run-time error '3075' Syntax error (missing operator) in query
expression '(Sub Name=Joes Desserts)' Here is my code...
Option Compare Database
Option Explicit
Private Sub Command4_Click()
DoCmd.OpenReport "All Subs", acViewPreview, , "Sub Name=" & Me.Combo0
End Sub