Access Access - Graph, ComboBox and Microsoft Jet problem

Joined
Sep 2, 2008
Messages
5
Reaction score
0
Hi all,

I'm having some trouble for doing my application in MS Access 2003:

I try to do a graph that is based in a query. One of the query's parameters is a ComboBox, located at the same form that my graph.

If i launch the query alone, it goes ok. My problem is when i launch the form with the graph, i receive a message "The Microsoft Jet database engine does not recognize 'Forms!F_stat!PROD2' as a valid field name or expression."

Here are my query's and the graph codes:

query:
Code:
PARAMETERS PROD2 Text ( 255 ), TYP_PROD2 Text ( 255 );
SELECT T_vent.SEMAINE, T_vent.PROD, T_vent.TYPE, T_vent.MAG, Count(T_vent.CPTE) AS nb_op, Sum(T_vent.MONTANT) AS SommeDeMONTANT
FROM T_vent
GROUP BY T_vent.SEMAINE, T_vent.PROD, T_vent.TYPE, T_vent.MAG
HAVING (((T_vent.PROD)=[Forms]![F_stat]![PROD2]) AND ((T_vent.TYPE)=[Forms]![F_stat]![TYP_PROD2]));

graph:
Code:
TRANSFORM Sum([nb_op]) AS [SommeDenb_op] SELECT [SEMAINE] FROM [R_prod_hebdo] GROUP BY [SEMAINE] PIVOT [MAG];

My form's name is F_stat, there are 2 ComboBox PROD2 and TYP_PROD2

thank you in advance for all tips,
 
I found the problem's solution: it has to be the complete adress in the query's parameters dialog box: [Forms]![F_stat]![PROD2]
 
Back
Top