here may be babblers, wholly ignorant of mathematics, who dare to condemn my hypothesis, upon the authority of some part of the Bible twisted to suit their purpose. I value them not, and scorn their unfounded judgment.
Can you help me create a function in which if i scan a product and it colors that record cell if it is in the table, or gives a msgbox Not Found and also a function that counts the no. of colored items. I have created these functions in excel. But i cant do it in access. Any help is appreciated. Please Help.
It may be better to use a Yes/No field in your table for indicating found or not found, because queries and aggregate functions can only work with fields of tables (or fields of other queries) -- they can't "see" the background color of a textbox on a form. When you have the Yes/No field set up, you can easily count the number of found items with:
DCount("*", "MyTable", "[Found] = True")
or an aggregate query:
SELECT Count(*) FROM MyTable WHERE [Found] = True;
You can do the above and still have the textbox color change accordingly as a visual aid for the user. But to be able to count, you need the above method.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visitor Forum.