compare field in one table to several fields in another table & al

G

Guest

I'm relatively new, so I'm not sure if what I'm asking is possible, but I
certainly am hoping...

Scenario 1—

I have two tables-
Table 1 includes the following 2 fields: UpdatePhone, Match
Table 2 includes the following 3 fields: Phone1, Phone2, Phone3

I would like to be able to compare UpdatePhone to Phone1, Phone2, and Phone3
in order to determine whether the UpdatePhone is different from the other
three phone numbers. If UopdatePhone matches any of the 3 phone numbers in
Table 2, I would like the Match field to indicate YES or NO. This is
something I did in Excel using an OR function, but it would be nice to
accomplish the same thing in Access.

----------------------------------------

Scenario 2—

I have two tables-
Table 1 includes the following field: UpdateAddress
Table 2 includes the following field: CustomerAddress

I have a form that includes the two fields above. If the information in the
two fields DOES NOT match exactly, I would like for both (or either) to turn
red or some other color to indicate that a discrepancy exists.

THANKS!!
 
G

Guest

Try this ---
UPDATE [Table 1], [Table 2] SET [Table 1].[Match] = -1
WHERE ((([Table 1].UpdatePhone)=[Phone1])) OR ((([Table
1].UpdatePhone)=[Phone2])) OR ((([Table 1].UpdatePhone)=[Phone3]));
 
G

Guest

Gosh, that makes perfect sense, but I can't figure out where to insert that
string into the update query SQL (if that's even possible). Can I accomplish
this using the design view of the update query? I feel like I'm so close....

Thanks (and sorry for my ignorance).


KARL DEWEY said:
Try this ---
UPDATE [Table 1], [Table 2] SET [Table 1].[Match] = -1
WHERE ((([Table 1].UpdatePhone)=[Phone1])) OR ((([Table
1].UpdatePhone)=[Phone2])) OR ((([Table 1].UpdatePhone)=[Phone3]));

--
KARL DEWEY
Build a little - Test a little


Emmett L. said:
I'm relatively new, so I'm not sure if what I'm asking is possible, but I
certainly am hoping...

Scenario 1—

I have two tables-
Table 1 includes the following 2 fields: UpdatePhone, Match
Table 2 includes the following 3 fields: Phone1, Phone2, Phone3

I would like to be able to compare UpdatePhone to Phone1, Phone2, and Phone3
in order to determine whether the UpdatePhone is different from the other
three phone numbers. If UopdatePhone matches any of the 3 phone numbers in
Table 2, I would like the Match field to indicate YES or NO. This is
something I did in Excel using an OR function, but it would be nice to
accomplish the same thing in Access.

----------------------------------------

Scenario 2—

I have two tables-
Table 1 includes the following field: UpdateAddress
Table 2 includes the following field: CustomerAddress

I have a form that includes the two fields above. If the information in the
two fields DOES NOT match exactly, I would like for both (or either) to turn
red or some other color to indicate that a discrepancy exists.

THANKS!!
 
G

Guest

What I posted WAS the update query SQL. Open a query in design view, click
on menu VIEW - SQL View. Paste the post in the window overwritting SELECT;
and edit out any added characters from posting and pasting.
Substitute your table and field names.
--
KARL DEWEY
Build a little - Test a little


Emmett L. said:
Gosh, that makes perfect sense, but I can't figure out where to insert that
string into the update query SQL (if that's even possible). Can I accomplish
this using the design view of the update query? I feel like I'm so close....

Thanks (and sorry for my ignorance).


KARL DEWEY said:
Try this ---
UPDATE [Table 1], [Table 2] SET [Table 1].[Match] = -1
WHERE ((([Table 1].UpdatePhone)=[Phone1])) OR ((([Table
1].UpdatePhone)=[Phone2])) OR ((([Table 1].UpdatePhone)=[Phone3]));

--
KARL DEWEY
Build a little - Test a little


Emmett L. said:
I'm relatively new, so I'm not sure if what I'm asking is possible, but I
certainly am hoping...

Scenario 1—

I have two tables-
Table 1 includes the following 2 fields: UpdatePhone, Match
Table 2 includes the following 3 fields: Phone1, Phone2, Phone3

I would like to be able to compare UpdatePhone to Phone1, Phone2, and Phone3
in order to determine whether the UpdatePhone is different from the other
three phone numbers. If UopdatePhone matches any of the 3 phone numbers in
Table 2, I would like the Match field to indicate YES or NO. This is
something I did in Excel using an OR function, but it would be nice to
accomplish the same thing in Access.

----------------------------------------

Scenario 2—

I have two tables-
Table 1 includes the following field: UpdateAddress
Table 2 includes the following field: CustomerAddress

I have a form that includes the two fields above. If the information in the
two fields DOES NOT match exactly, I would like for both (or either) to turn
red or some other color to indicate that a discrepancy exists.

THANKS!!
 
G

Guest

Darn. Didn't return anything. BUT, I get the principle of it. I must have
something awry with the tables. Anyhow, thanks for your help.

KARL DEWEY said:
What I posted WAS the update query SQL. Open a query in design view, click
on menu VIEW - SQL View. Paste the post in the window overwritting SELECT;
and edit out any added characters from posting and pasting.
Substitute your table and field names.
--
KARL DEWEY
Build a little - Test a little


Emmett L. said:
Gosh, that makes perfect sense, but I can't figure out where to insert that
string into the update query SQL (if that's even possible). Can I accomplish
this using the design view of the update query? I feel like I'm so close....

Thanks (and sorry for my ignorance).


KARL DEWEY said:
Try this ---
UPDATE [Table 1], [Table 2] SET [Table 1].[Match] = -1
WHERE ((([Table 1].UpdatePhone)=[Phone1])) OR ((([Table
1].UpdatePhone)=[Phone2])) OR ((([Table 1].UpdatePhone)=[Phone3]));

--
KARL DEWEY
Build a little - Test a little


:

I'm relatively new, so I'm not sure if what I'm asking is possible, but I
certainly am hoping...

Scenario 1—

I have two tables-
Table 1 includes the following 2 fields: UpdatePhone, Match
Table 2 includes the following 3 fields: Phone1, Phone2, Phone3

I would like to be able to compare UpdatePhone to Phone1, Phone2, and Phone3
in order to determine whether the UpdatePhone is different from the other
three phone numbers. If UopdatePhone matches any of the 3 phone numbers in
Table 2, I would like the Match field to indicate YES or NO. This is
something I did in Excel using an OR function, but it would be nice to
accomplish the same thing in Access.

----------------------------------------

Scenario 2—

I have two tables-
Table 1 includes the following field: UpdateAddress
Table 2 includes the following field: CustomerAddress

I have a form that includes the two fields above. If the information in the
two fields DOES NOT match exactly, I would like for both (or either) to turn
red or some other color to indicate that a discrepancy exists.

THANKS!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top