Re: error -2147217904 - how to fix :o( ?
- From: "David W. Fenton" <XXXusenet@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 22 Dec 2005 17:50:50 -0600
oraustin@xxxxxxxxxxx wrote in
news:1135288951.185848.30520@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
> sorry david, maybe I am being a bit dim but I don't quite
> understand. If the queries don't have the where clauses then the
> won't work in other circumstances.
If the saved queries don't have WHERE clauses, yes, the saved
queries return all the records.
> Either way - isn't that similar to "dynamic" SQL ( a phrase from
> above) which seems to mean a string of SQL language with a
> variable embeded in it - in this case the value of a control on a
> form
Well, I don't know. When I say on-the-fly SQL, I mean that somewhere
in code, you define the WHERE clause and assign the SQL as a
recordsource for your report or form. This is very different from
embedding parameters or references to form controls in the SQL,
which is something I avoid doing (except in the one or two
situations where it is pretty much required; those are very
uncommonly needed, in my experience).
The point is that if you need to open a filtered report or form, you
use the base saved query and add a WHERE clause. DoCmd.OpenForms and
DoCmd.OpenReport can both take a WHERE clause argument that will
filter the result, so you don't need to embed anything in your saved
query.
And mostly, I don't use saved queries that much as plain old
recordsources. I only use them when I need nested queries to an
extent that is greater than what is allowed with subqueries of the
"[]. As Alias" form.
--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
.
- References:
- error -2147217904 - how to fix :o( ?
- From: oraustin
- Re: error -2147217904 - how to fix :o( ?
- From: Lyle Fairfield
- Re: error -2147217904 - how to fix :o( ?
- From: oraustin
- Re: error -2147217904 - how to fix :o( ?
- From: Lyle Fairfield
- Re: error -2147217904 - how to fix :o( ?
- From: oraustin
- Re: error -2147217904 - how to fix :o( ?
- From: Lyle Fairfield
- Re: error -2147217904 - how to fix :o( ?
- From: oraustin
- Re: error -2147217904 - how to fix :o( ?
- From: RoyVidar
- Re: error -2147217904 - how to fix :o( ?
- From: oraustin
- Re: error -2147217904 - how to fix :o( ?
- From: Lyle Fairfield
- Re: error -2147217904 - how to fix :o( ?
- From: oraustin
- Re: error -2147217904 - how to fix :o( ?
- From: Lyle Fairfield
- Re: error -2147217904 - how to fix :o( ?
- From: oraustin
- Re: error -2147217904 - how to fix :o( ?
- From: David W. Fenton
- Re: error -2147217904 - how to fix :o( ?
- From: oraustin
- error -2147217904 - how to fix :o( ?
- Prev by Date: Re: OldValue not set
- Next by Date: Re: Totally lost on Date Sort
- Previous by thread: Re: error -2147217904 - how to fix :o( ?
- Next by thread: Re: error -2147217904 - how to fix :o( ?
- Index(es):
Relevant Pages
|