[AccessD] Filter by Form stuff

Asger Blond ab-mi at post3.tele.dk
Tue Apr 15 04:42:02 CDT 2008


Arthur,

Have had this issue too. I had to strip both the "Lookup_*." for
comboboxes/listboxes and the name of the query, on which the form was based,
from the filterstring - like this:

strCriteria = Me.Filter
'Strip string - remember to include the dot
strCriteria = Replace(strCriteria, "Lookup_cboMyCombo.","")
strCriteria = Replace(strCriteria, "qryMyQuery.","")
'Then print report
DoCmd.OpenReport "rptMyReport", acPriview, strCriteria

HTH
Asger



-----Oprindelig meddelelse-----
Fra: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] På vegne af Arthur Fuller
Sendt: 15. april 2008 09:16
Til: Access Developers discussion and problem solving
Emne: [AccessD] Filter by Form stuff

Does anyone understand this stuff? I certainly don't. When I inquire upon
the current filter I get this (to me) strange Lookup_* stuff that I do not
comprehend. I need to strip all this and I know how to do Replace() etc. but
that doesn't seem to be the issue.

I have a form. The user elects to impose a filter. I want to be able to
print the report, respecting said filter. This has proved problematic. I
need to figure this out. Any suggestions?

As always, TIA,
Arthur

(In the immortal words of the Simpsons: there are no stupid questions, only
stupid people. I confess to membership in the latter category. I am a stupid
person. Ok, fine. Let us move on and grant me the wisdom of the smart people
here.)
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com












































































































































































More information about the AccessD mailing list