ge*********@hotmail.com wrote in news:1115799878.387838.171900
@o13g2000cwo.googlegroups.com:
Hi,
I am atempting to compare part of a field with the whole of another
field in access. Is this possible?
Basically I have 2 tables with the following info:
Table1
Field1 = MR.
Table2
Filed1 = MR
I want to be able to check whether the field in Table1 contains a
trailing fullstop, if it does i want ot remove it and then compare, if
it doesnt i simply want to compare to Table2 field.
Can this be done in the QBE window
Yes. This is a trivial problem but the solution depends upon information
you have not provided.
Are you using JET? If you don't know then answer is, "Yes".
Assuming "Yes":
Are you using a recent version of Access (>=2002 I believe) which will
allow you to use the VBA Replace function in queries? If not we may have to
write a UDF to remove the ".".
Must the "." stay in Table1, Field1, or may we just run an update query to
remove it and do our comparison later?
Are you comparing each of the rows in Table1 with each of the rows in
Table2?
If not how are you mapping the rows so that each row in Table1 is compared
with the appropriate row in Table2?
BTW. Two tables with the same data is almost always a bad idea. Just one of
the reasons is that it's difficult to keep the data in both tables up-to-
date.
--
Lyle
"The aim of those who try to control thought is always the same. They find
one single explanation of the world, one system of thought and action that
will (they believe) cover everything; and then they try to impose that on
all thinking people."
- Gilbert Highet