I'm trying to get the filter by form filter from a form/subrorm and use it in a query.
I'm using the general form:
I'm finding that in looking at the querydef that it is only picking up the filter values from the main form and not the subform.
I may be mistaken, but, I thought it was working earlier today. I have done a few things, but, I can't think of anything I might have done to affect this.
Any ideas?
I'm using the general form:
Code:
dim genSql,qd as dao.querydef, as string
genSql="select * from tablename"
qd=currentdb.querydef("nameOfQuery")
qd.sql=genSql & " where " & me.filter
docmd.openquery "nameOfQuery"
I'm finding that in looking at the querydef that it is only picking up the filter values from the main form and not the subform.
I may be mistaken, but, I thought it was working earlier today. I have done a few things, but, I can't think of anything I might have done to affect this.
Any ideas?