Problem with query filtering for line graph (1 Viewer)

Bean Machine

Member
Local time
Today, 01:08
Joined
Feb 6, 2020
Messages
75
Hi everyone! I am currently in the process of making a graph that can be filtered based on values in a combo box. I build a query specifically for the graph that contains the year, the grouping codes associated with items (basically tags), and the total amount spent per grouping. Usually using the phrase Like "*" & [Forms]![form name]![control name on form] & "*" in the criteria section of the fields I want to be able to filter to works completely fine and does the job, but for whatever reason I am getting the error "The microsoft access database does not recognize "[Forms]![frm_SSNR]![cbx_DDS]" despite the form name being correct as well as the combo box name being correct. The combo boxes are unbound as well if that means anything, I'll include some images.
 

Attachments

  • combo boxes.png
    combo boxes.png
    4.9 KB · Views: 51
  • error msg.png
    error msg.png
    4.1 KB · Views: 46
  • query info.png
    query info.png
    6.9 KB · Views: 26

Ranman256

Well-known member
Local time
Today, 01:08
Joined
Apr 9, 2015
Messages
3,889
for graphs & crosstabs ALWAYS put the form paths in the query PARAMETERS. (they don't like it when it's missing)
design the query ,
click PARAMETERS icon on toobar,
[Forms]![frm_SSNR]![cbx_DDS] , string (or date , or number...)

save query, then run graph or xtab.
 

Bean Machine

Member
Local time
Today, 01:08
Joined
Feb 6, 2020
Messages
75
for graphs & crosstabs ALWAYS put the form paths in the query PARAMETERS. (they don't like it when it's missing)
design the query ,
click PARAMETERS icon on toobar,
[Forms]![frm_SSNR]![cbx_DDS] , string (or date , or number...)

save query, then run graph or xtab.
Hi there, sorry for the late reply, been really busy with some other things lately, I tried to add what you said to the PARAMETERS in query design tab but it doesn't seem to be working. I have three fields on the query, one is the year, one is the grouping code (tags basically) and the last is the sum of the amount spent on the item. I have two combo boxes, one is called "cbx_DDS" which is to filter to the year, and the other is called "cbx_GCS". I'm not sure if this helps shed more light onto what I'm trying to do but I hope it does. Maybe I'm just missing something, and if so, I apologize.
 

Users who are viewing this thread

Top Bottom