Solved Issues with Filters in reports, they dissapear!!!! (1 Viewer)

Sodslaw

Registered User.
Local time
Yesterday, 16:54
Joined
Jun 7, 2017
Messages
81
I have made a video of my issue. I dont know why but after making changes in design view (Navigation plane>right click the report>Select Design View) the Filter is blank please see video...

Before Editing...
1653389336138.png


After Editing...
1653389288736.png


Video...

Is it an Access Bug? Can it be fixed? is there a better way to make filters work?
 
Last edited:

CJ_London

Super Moderator
Staff member
Local time
Today, 00:54
Joined
Feb 19, 2013
Messages
16,629
your video doesn't show anything about the filter but your filter does not make sense anyway. What are you trying to achieve
 

Sodslaw

Registered User.
Local time
Yesterday, 16:54
Joined
Jun 7, 2017
Messages
81
your video doesn't show anything about the filter but your filter does not make sense anyway. What are you trying to achieve
Hi @CJ_London Watch the video 1-2 seconds in, it shows the property sheet with the filter populated, after changing the SQL query its gone. im not sure why you beleive the video doesnt show anything. sorry. but never the less after editing the report the code in the filter dissapears.

BTW the filter works well when access doesnt delete it. Please go to the last few threads for...
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 00:54
Joined
Jul 9, 2003
Messages
16,285
You may find this video of interest:-

Filter a Report from a Form
 

CJ_London

Super Moderator
Staff member
Local time
Today, 00:54
Joined
Feb 19, 2013
Messages
16,629
sorry, don't have time to go find the answer to my question for myself - but looks like UG has a solution for you
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 07:54
Joined
May 7, 2009
Messages
19,247
maybe you Remove the filter (in form view) and Save the form (Ctrl-S).
 

Sodslaw

Registered User.
Local time
Yesterday, 16:54
Joined
Jun 7, 2017
Messages
81
ive made a nother video showing the same issue it may be a clearer. no removal or deletion of this code by me.

@Uncle Gizmo, will check out your video
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 07:54
Joined
May 7, 2009
Messages
19,247
i tested and it did delete the filter.
what you can do is Embed the filter to your select statement:

Record Source: select the field WHERE the filter here;
 

Sodslaw

Registered User.
Local time
Yesterday, 16:54
Joined
Jun 7, 2017
Messages
81
@arnelgp
So in the where statement of the SQL, is....
Code:
WHERE (((TblPARTS.PART_NO)<>"-" And (TblPARTS.PART_NO) Not Like "AC*"));
So having this in the SQL and this code in the filter
Code:
IIF(DCount("*","QSalesQuotationItemAcc","OrderID = " & OrderID)=0,POSITION>0,POSITION < DMin("POSITION","QSalesQuotationItemAcc","OrderID = " &OrderID))
Im guessing having both could be causing my bug, issue right? And I just need to combine the 2 statements in the SQL. can you give me some guidanace on this please?
Code:
WHERE (((TblPARTS.PART_NO)<>"-" And (TblPARTS.PART_NO) Not Like "AC*")) AND (IIF(DCount("*","QSalesQuotationItemAcc","OrderID = " & OrderID)=0,POSITION>0,POSITION < DMin("POSITION","QSalesQuotationItemAcc","OrderID = " &OrderID)));
Ill back everything up and try it.
 
Last edited:

Sodslaw

Registered User.
Local time
Yesterday, 16:54
Joined
Jun 7, 2017
Messages
81
so it appears that the filter in the propery plane, is overwritten by the SQL ( i've never come accorss it before) and after moving within the where statement of the SQL, It seems to have been solved.
This seems to work...
Code:
WHERE (((TblPARTS.PART_NO)<>"-" And (TblPARTS.PART_NO) Not Like "AC*") AND ((IIf(DCount("*","QSalesQuotationItemAcc","OrderID = " & [OrderID])=0,[POSITION]>0,[POSITION]<DMin("POSITION","QSalesQuotationItemAcc","OrderID = " & [OrderID])))<>False));

Thanks for your help guys!
 

Users who are viewing this thread

Top Bottom