Using Text Box to filter Report

jeudi 16 avril 2015

I have been on the simplest thing for so long and I am going crazy!



I have a text box in a report that was calculated,



=IIf([RemainingGrantFunds]<([Grant_Amount]*0.2),"1","0")



So, if certain criteria are met, either a 1 or a 0 will be shown.



Then in my OpenReport VBA I have,



DoCmd.OpenReport stDocName, acPreview, , "ExpiryTag = 1"



'ExpiryTag' is the name of the text box from above.



When it equals 1, I want the report to show those records. I have done this for other reports and it worked so easily, and for some reason it just doesn't want to work on this report. I believe the difference is that the text box is calculated in the report and not in the query (for this report I can not calculate it in the query). I think it might have something to do with the output of the 1 and 0



ie. "1" versus '1' or just 1.



I have also tried every iteration of "ExpiryTag = 1"



ie. "ExpiryTag = '1'" or "[ExpiryTag] = 1" etc.



Can someone please help, I am going crazy!

Using Text Box to filter Report

0 commentaires:

Enregistrer un commentaire

Labels