Trouble getting Textbox as Checkbox to function (1 Viewer)

Gasman

Enthusiastic Amateur
Local time
Today, 22:02
Joined
Sep 21, 2011
Messages
14,350
I am so glad I just used the checkbox as is when I needed one . :)
 

CJ_London

Super Moderator
Staff member
Local time
Today, 22:02
Joined
Feb 19, 2013
Messages
16,629
I've resolved the problem - turned out my form had a corruption -recreating the form resolved the issue - link updated
 
Last edited:

JMongi

Active member
Local time
Today, 17:02
Joined
Jan 6, 2021
Messages
802
Thanks to all the replies. I have to take care of some other responsibilities and will come back to this later. So, I don't have time to review all the linked information right now.

@The_Doc_Man - I tried to sort some things out using CharMap and I don't understand the character codes or how to use them in this context to identify a character. I'll google it in a bit. Just wanted to let everyone know.

@strive4peace - Similar statement to above. I tried copying the appropriate characters out of the wingding font set in CharMap and it got converted in the format property and then didn't resolve correctly when loading the form. I'm not 100% clear on what "using unicode characters" means.

Thanks again! When I get back to this, I'll post a resolution or more questions.
 

JMongi

Active member
Local time
Today, 17:02
Joined
Jan 6, 2021
Messages
802
Ok, so I'm back. I've mainly figured out the fonts (still don't understand how to specify a 4 digit unicode character but that isn't directly important anymore).

Now, I'm trying to get the VBA code to work correctly and cleanly. The bound field is now an integer field instead of yes/no.
Requirements:
1. Needs to be tied to the underlying field.
2. Is either checked (true/-1) or unchecked (false/0). No null. Default field value is 0.

I have an invisible textbox for moving the focus as needed.
Current check/textbox control settings: Locked, Enabled

Issues:

I can also click/hold and drag to select the underlying value.
You can also see the underlying value and cursor when clicking on it.
 

JMongi

Active member
Local time
Today, 17:02
Joined
Jan 6, 2021
Messages
802
I think I solved it.
My invisible tetxbox for focus shifting is called txtFocus.
The pseudo check box is txtRunning.
Here's what I did:

In the DblClick Event Procedure
txtFocus.SetFocus 'To prevent unwanted textbox editing

In the MouseDown Event Procedure
txtFocus.SetFocus 'To prevent unwanted textbox editing

In the MouseUp Event Procedure
If Not txtRunning.Locked Then txtRunning = Not Nz(txtRunning, False)
 

Users who are viewing this thread

Top Bottom