Conditional formatting based on other table field

Have an name formAA which comes from
TABLE-A
inside formAA  have an field txtbox-AAA

need make an conticional fromatting in txtbox-AAA IN formAA
AFTER IT COMPARE VALUES IN TABLE -BB
TABLE-BB is an list of number IN TXT FORMAT

is txtbox-AAA is equal to any number from TABLE-B   LIST
then txtbox-AAA HAVE TO BE WITH AN CONDITIONAL FORMATING
COLOR

TABLE-BB- HAVE JUST TWO FIELD -

PK-PRIMARY KEY- AUTOMATIC-NUMBER FORMAT
PARNUM- TXT FORMAT

PARNUM IS WHERE THE LIST
 OF NUMBERS HAVE TO BE SEE TO BE COMPARE

ALL NUMBRES IN TABLE -A  AND NUMBERS LIST IN TABLE -BB ARE TXT FORMAT


please any idea ?
I full appreciated you help !
micky runningAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Try including TABLE-B in the Datasource for the form, then just refer to the Table-B.PARNUM field in your condition. You'd use a LEFT OUTER JOIN to do this:

SELECT * FROM Table-A INNER JOIN Table-B ON Table-A.YourField=Table-B.PARNUM

In your Conditional Formatting, you can check for a non-null value in Table-B.PARNUM. If there is no value there, then there is no match on the value in Table-A's field.
0
micky runningAuthor Commented:
Scott Thanks for any assistance that you can provide.

you mean make an query as the datasource
which will include 2 tables
TABLE-A AND TABLE B
and in the txtbox-AAA conditional formating  write

SELECT * FROM Table-A INNER JOIN Table-B ON Table-A.YourField=Table-B.PARNUM

and asking because i don't get it yet..
is that ok?
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You'd use a Query as the RecordSource of your Form, and include Table-A and Table-B in that query (and make sure to Join them correctly).

From there, you can refer to the field from Table-B in your conditional formatting Rule. Basically, if that value is NULL, then no match for the value exists. If a value is present in Table-B.PartNum, a match exists.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.