New modern style charts transformed row source problem

%3CLINGO-SUB%20id%3D%22lingo-sub-1447493%22%20slang%3D%22en-US%22%3ENew%20modern%20style%20charts%20transformed%20row%20source%20problem%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1447493%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHave%20a%20Table1%20(see%20an%20attachment)%20and%20a%20crosstab%20query%20on%20its%20base.%20Creating%20a%20form%20with%20a%20new%20style%20chart%20(I%20use%20Access%202019)%20with%20this%20very%20query%20as%20recordsource.%20No%20problem%2C%20everything%20works%20fine.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%20I%20try%20to%20assign%20to%20the%20chart%20recordsource%20the%20same%20sql%20syntax%20as%20I%20have%20in%20my%20crosstab%20query%20but%20via%20VBA.%20And%20at%20this%20moment%20an%20error%20occurs%20with%20explanation%20that%20I%20have%20some%20mistake%20in%20FROM%20clause.%20But%20how%20can%20it%20be%20if%20I%20use%20the%20same%20syntax%20which%20I%20have%20in%20the%20query%20which%20works%20ok%3F%20As%20I%20understand%20the%20problem%20happens%20when%20Recordsource%20is%20being%20changed%20by%20Access%20in%20Transformed%20Recordsource.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20help!%20Thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1447493%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3E2019%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAccess%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
New Contributor

Hi,

 

Have a Table1 (see an attachment) and a crosstab query on its base. Creating a form with a new style chart (I use Access 2019) with this very query as recordsource. No problem, everything works fine.

 

Then I try to assign to the chart recordsource the same sql syntax as I have in my crosstab query but via VBA. And at this moment an error occurs with explanation that I have some mistake in FROM clause. But how can it be if I use the same syntax which I have in the query which works ok? As I understand the problem happens when Recordsource is being changed by Access in Transformed Recordsource.

 

Please help! Thanks!

1 Reply
Highlighted