Why would you store multiple items in one field? That kinda defeats the who
purpose of having fields and being able to define what data goes in them.
It means you are limited in how well you can error check.
How do you get "From University" out of "NJ Princeton 1 Princeton Way"?
Looks like they are from New Jersey to me. Do you have a table somewhere
where you store the entry vs. what you want to display? Access has no way
of knowing Princeton's address, much less knowing that anyone listing that
address should be said to be "from unoversity".
Why not have a field for address, a field for city, a field for state, etc.?
You could even make "state" a drop-down box where they could select the
state. You could have a table with all the abreviations and the full names.
Using your current structures, you'd have to write one helluva IF or CASE
statement to do what you want.
I'd step back and rethink my design.
Rick B
sacredarms said:
Thanks Rick, I believe I did not ask the right question. My address field
contains the state abbreivation, the town, and the street address, so where
the address field contains "NJ" I would need it to return from New Jersey. In
another example if the field contains "NJ Princeton 1 Princeton Way" I might
need it to return From Univesity. Depending on the address the information
returned would vary.
Thanks again for the help.
Rick B said:
Why would you do this in a query? In the form or report, simply add a new
unbound field, and put something like the following...
="From "& [City]
The result would display as follows (assuming your city field contains "New
Jersey"...
From New Jersey
sacredarms said:
I have a table with multiple fields. One of the fields is address. I would
like to take the address and depending where it is I would like to
create
a
new field that is pre defined. ex. address field reads "NJ Princeton 1 test
lane" I would like it to write from "From New Jersey" and so on.
Any help would be appreciated.