Trying to revive a Ken Snell thread

Trying to revive a Ken Snell thread

Post by Laure » Thu, 16 Sep 2004 21:32:17


Ken, here's a response to your helpful answer back in the thread called "How
can I refresh this filter attribute?" I posted it some time after the
original interchange, so it probably didn't pop up on your radar. TIA,
Laurel


OK, now I think I have a variation on this problem. I believe your
suggestion is working when the "stuck" criterion is found, literally, in the
filter property of the form itself. But there is another situation where
the "stuck" criterion is found as part of the Query that is behind a form.
That is, I have to open up the recordsource and then I see the "stuck"
criterion. In this situation, setting the Me.Filter doesn't get rid of the
critierion attached to the query. When I query is used inside of a script,
I "refresh" it with the following routine. I have too forms of the query,
one that is never used except to refresh the one that is used. But I don't
know how to refresh the query behind a form. I has already been opened by
the time I'm able to execute a script. (I think.) Surely I don't have to
have a different query for every form - each one varying only in name, so
they can't get "corrupted?" Or I don't have to have a "hidden" form that
does nothing but refresh the query behind the form about to be opened?

(E.g., I have a QueryScoresBase and a QueryScores, and I execute the
following Set qdfBaseQuery = CurrentDb.QueryDefs(as_BaseQuery)
Set qdfRefreshedQuery = CurrentDb.QueryDefs(as_RefreshedQuery)
li_order = InStr(1, qdfBaseQuery.SQL, "Order By")
ls_select = Left(qdfBaseQuery.SQL, li_order - 1)
ls_sort = Right(qdfBaseQuery.SQL, Len(qdfBaseQuery.SQL) - (li_order -
2))
ls_sql = ls_select & ls_where & ls_sort
qdfRefreshedQuery.SQL = ls_sql
qdfBaseQuery.Close
qdfRefreshedQuery.Close
 
 
 

1. Question for Ken Snell

2. Query: ATTN Ken Snell

Ken,

You and I spoke some weeks ago about a query I was trying to create.
You wanted me to post the SQL statment. The original thread is here:

http://www.yqcomputer.com/

Here is the SQL statement you asked for:

SELECT NICKLABL1.[FIRST NAME], NICKLABL1.INITIAL, NICKLABL1.[LAST
NAME], NICKLABL1.ADDLINE1, NICKLABL1.ADDLINE2, NICKLABL1.CITY,
NICKLABL1.STATE, NICKLABL1.[ZIP OR POST], NICKLABL1.COUNTRY,
NICKLABL1.[COMPANY NAME]

FROM NICKLABL1

ORDER BY NICKLABL1.[ZIP OR POST], WHERE([INACTIVE]=True And
([EMAIL]<>"" And [EMAIL] Is Not Null)) Is Not Null;

3. Help again from Ken Snell (Query)

4. DLookup Syntax Help for Ken Snell

5. Ken Snell - Displaying chemical structures in Access

6. Ken Snell's Export to multiple Spreadsheets

7. For KEN SNELL ... filter one combo box to another...

8. Ken Snell's Multiple sheet export

9. FAO Ken Snell - RefreshAll

10. Ken Snell FU: Requery Filtered Combo Box

11. DLook Syntax Help - for Ken Snell

12. Attn: Ken Snell - Displaying chemical structures in Access

13. Ken Snell (MVP)

14. Ken Snell... please reply

15. How could I ask Thread B to call B().Method() from inside Thread A's run?