> I was putting the criteria Len([address])>33
> below in the criteria row of the [address]
> column for the query. Access was automatically
> enclosing the 33 in " ".
>
This is because in the designer window you can only
compare apples to apples or, in your case, text to
text.
> I went into the SQL view and changed it to
> remove the " " enclosure and in design view,
> I got a different look. It made a separate
> column with the criteria Len([address]) shown
> as the field name and below it on the
> criteria row >33 (no " " enclosure).
>
This is because this is actually what you are doing.
You are creating a temporary query field that is of
the type Integer (or Long) that is based off the Text
field [address] and then comparing that result to the
value 33. A more typical way of seeing a temporary
query field in the designer window is:
Expr1:(Len([address]))
Where upon you can change the Expr1 to something more
appropriate such as AddrLen so that it appears as:
AddrLen:(Len([address]))
In SQL this will appear as:
(Len([address])) AS AddrLen
> That did the trick. I'm not sure I
> understand this in Access design view but
> I do understand it in SQL.
>
I hope the above better explains what it is going on.
Secondary Note: This trick of renaming variables can
also be directly applied to a variable for instance
say you have two tables with a Field that has the same
name. In your Query you could say something like
this:
SELECT Table1.SameField, Table2.SameField AS 2ndField
Thus in your resulting Query set you could simply
reference SameField and 2ndField rather than
Table1.SameField and Table2.SameField. This is
particularly handy if you are layering Queries.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
SPONSORED LINKS
| Microsoft access database | Database development software | Microsoft access development |
| Database management software | Inventory database software | Membership database software |
YAHOO! GROUPS LINKS
- Visit your group "AccessVBACentral" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
