Link to home
Start Free TrialLog in
Avatar of dawber39
dawber39Flag for United States of America

asked on

Access report Record SOurce Query Syntax

Although it is uncommon - I need to put a huge query in a record source of a textbox on an access report - is this in the proper syntax?

SELECT Sum([qryPlanner-ProdMethod-WkREPORT].Sales), Sum([qryPlanner-ProdMethod-WkREPORT].Fcst)
FROM [qryPlanner-ProdMethod-WkREPORT]
WHERE ((([qryPlanner-ProdMethod-WkREPORT].WkBeginDate)>=Date()-32)) OR ((([qryPlanner-ProdMethod-WkREPORT].WkBeginDate)<=Date()-6));
Avatar of dawber39
dawber39
Flag of United States of America image

ASKER

Oh - and the query being used in this query - is the report record source
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
1) A Textbox does not have a Record Source, it has a Control Source.
2) You cannot put an SQL statement directly in a Text Box Control Source.

mx
That's what I put it in... my bad

Here's the errorUser generated image
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Excellent as always - Thank you people