PDA

View Full Version : Solved: Is it possible to add a messagebox to a checkbox when ticked or not ticked using VBA?



wedd
10-17-2011, 09:17 AM
Calling all vba expertsI have a simple question. I would like to add a message box to a checkbox when it is marked. I have column in a able that have ticked boxes and unticked boxes. What I would like is the columns that are ticked will show in a form as "available" and the boxes that are unticked will display in the for as "unavailable". I'm not sure if it's a DIM, IF THEN STATEMENT...

If you do know can you show me an explae of code or a website where I can see an exmaple. Thanks for your contributions!:friends:

CreganTur
10-19-2011, 12:57 PM
Are you saying that you want the field's value to say "available" if it is checked? I ask because when you say MessageBox that says to me you want a popup MessageBox window, but your description doesn't seem to match that.

If you just want the field values to show text instead of the checkboxes, then you can do that by creating a view with a calculated field. Create this field using a SQL IFF expression so that true="Available" and false="Unavailable"

CreganTur
10-19-2011, 12:58 PM
*double post*

wedd
10-20-2011, 04:21 AM
Thanks Cregan! I've written a sql query and it works fine. Is there a way I can also create a messagebox that displays "available" or "unavailable" based on my query (expression) related to the checkboxes ticked or unticked?


Thanks in advance!:friends:

wedd
10-24-2011, 05:26 AM
CreganTur, thanks it works! Great! The results based on the checkbox are displaying in the table. Is it possible for the results also to be displayed in a form as well?