Incorrect syntax in recordsource

G

Guest

Hi all
I'm setting the recordsource of a subreport as
strQuery = "EXEC Ord_NoCardine"
Me.RecordSource = strQuery

If I run the subreport by itself all is fine, but when the main report calls
the subreport I get the "Incorrect syntax near EXEC" error message..

Can someone help me?

Thanks
 
J

Jeff Boyce

?The name of your query is "EXEC Ord_NoCardine"? That seems like an
unlikely name for a query.

Try using the query name itself ... your error message sounds like Access is
confused about something it is trying to interpret as an EXECUTE command.
 
G

Guest

"Ord_NoCardine" is the name of a stored procedure, there's nothing wrong for
me..
Infact when I run the subreport alone everything is fine...
 
J

Jeff Boyce

If you are running against SQL-Server or another non-JET backend, you'll
need to read up in Access HELP about using pass-through queries.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top