Full Version: Check Boxes on Forms
UtterAccess Forums > Microsoft® Access > Access Forms
tmarie827
Hi-
On one of my tables I have a field with a Yes/No data type. When I create a form it will give me a checkbox for the field, which is fine. How do I increase the size of the so called checkbox? Or can you?
Thank you!
Tina
bulsatar
You can not. However, one way around that is to create your own custom picture to the size you want and then have code behind the On Click to set the invisible checkbox behind it to true or false. I saw another way that used character codes in a textbox for "blankbox" and "checked box" that are in the default character set, but I could never get that one to work
tmarie827
What if I changed it to a toggle button since it is resizable and when clicked (which is a Yes) it changes the color to red or black? Is there code that can be inserted in the event procedure for onclick event?
bulsatar
I didn't see a background color choice for the toggle button. If you have a couple of dedicated pictures, you could swap the path out each time, but that assumes your pictures will never change location.
If you keep the pics in the same folder as the db, you could use the CurrentProject.Path & "\NameOfYourPic.jpg"
tmarie827
I may not be understanding this correctly, but if I am I don't think a picture will do because it has to record in the table whether it is a yes or no for some of my forms/reports. To make the picture visible on true or false will not record in my table whether it is a yes or no. If I am incorrect, please help me to understand how this can be done.
Thank you!
bulsatar
You are absolutely correct, that is why I suggested to add code behind the image to change your checkbox. I have created a quick sample form to show you what I am talking about.
tmarie827
Wow, this looks GREAT!! And this will record the check (Yes) in my table? I'll have to look at the code to see what you did.
Thank you!
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.