Re: use a textbox as a resizeable and colourful checkbox (1 Viewer)

fhsmith

Registered User.
Local time
Yesterday, 19:35
Joined
Jul 18, 2019
Messages
11
Re: use a textbox as a resizeable and colourful checkbox

I am still having trouble with resizing my checkbox yes/no field to make the box bigger. What I would like to do. Have the text field reflect an X if true "on click" and nothing if not clicked - the source would be my yes/no field. Note that I am using an older version of Access - ie. 2002.

Any assistance in this matter is deeply appreciated.
 

isladogs

MVP / VIP
Local time
Today, 00:35
Joined
Jan 14, 2017
Messages
18,186
Re: use a textbox as a resizeable and colourful checkbox

@fhsmith
I moved your post to a new thread.
Once again you posted a question to the code repository which is a moderated area ignoring my previous request to start a new thread.

For the benefit of other members this relates to a thread started by CJ London in the repository https://www.access-programmers.co.uk/forums/showthread.php?t=305659
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:35
Joined
Oct 29, 2018
Messages
21,358
Re: use a textbox as a resizeable and colourful checkbox

Hi. What were the exact troubles you were having when trying out the suggested approach?
 

fhsmith

Registered User.
Local time
Yesterday, 19:35
Joined
Jul 18, 2019
Messages
11
Re: use a textbox as a resizeable and colourful checkbox

I have a form with a yes/no check-off box on it. The box is too small and needs to be resized.

I created a text field. Did all the formating according to london's post -eg did all the formatting in the formating property, the source was the yes/no field, etc. I also deleted the yes/no field already on the form and replaced it with the text box.

What I really want is when a new record is created, the checkbox should be empty. If I want yes, then I would like to just click on it to return an X in the box thusly populating the yes/no field in the main table.


Sorry for any confusion I have created.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:35
Joined
Oct 29, 2018
Messages
21,358
Re: use a textbox as a resizeable and colourful checkbox

I have a form with a yes/no check-off box on it. The box is too small and needs to be resized.

I created a text field. Did all the formating according to london's post -eg did all the formatting in the formating property, the source was the yes/no field, etc. I also deleted the yes/no field already on the form and replaced it with the text box.

What I really want is when a new record is created, the checkbox should be empty. If I want yes, then I would like to just click on it to return an X in the box thusly populating the yes/no field in the main table.

Sorry for any confusion I have created.
Hi. You started to describe what you tried, using the instructions from the other thread, but you didn't finish telling us what the result of your attempts were. We can't tell you what you did or didn't do wrong if we can't see what you did and you don't describe it to us. What you want to happen is doable, and the other thread shows you how to achieve it. If your attempts are failing, then it's probably simpler if someone does it for you. To do so, you may have to post a copy of your db for modification. Just a thought...
 

fhsmith

Registered User.
Local time
Yesterday, 19:35
Joined
Jul 18, 2019
Messages
11
Re: use a textbox as a resizeable and colourful checkbox

Sorry for incompletion. After all that I did, just a bunch of unrelated icons are reflected in the text box. As per your request, I am attaching a copy of the database. It is very simple and entitled MicroGreens. The entry form has two yes/no checkoff boxes. I want to replace the smaller boxes with larger ones.
 

Attachments

  • MicroGreens.mdb
    412 KB · Views: 83

CJ_London

Super Moderator
Staff member
Local time
Today, 00:35
Joined
Feb 19, 2013
Messages
16,553
Re: use a textbox as a resizeable and colourful checkbox

Had a look at your db - I see checkboxes, I don't see textboxes
 

CJ_London

Super Moderator
Staff member
Local time
Today, 00:35
Joined
Feb 19, 2013
Messages
16,553
Re: use a textbox as a resizeable and colourful checkbox

just tried to add a textbox - you have other code which is generating a bunch of errors - however box displays a cross or a tick per the setting.Only issue is you seem to have code that disables the form-don't know if this is a problem with a very old version of access, or that my version is not reading yours correctly or something to do with your existing code
 

fhsmith

Registered User.
Local time
Yesterday, 19:35
Joined
Jul 18, 2019
Messages
11
Re: use a textbox as a resizeable and colourful checkbox

I have no idea, maybe older version - ie. Access 2002. Looks like this issue is impossible to solve. Will have to live with the current situation.

Many thanks for your professional and timely assistance. Blessings be to all.
 

Micron

AWF VIP
Local time
Yesterday, 20:35
Joined
Oct 20, 2018
Messages
3,476
Re: use a textbox as a resizeable and colourful checkbox

something like this?

View attachment MicroGreens.mdb


P.S. you have keyboard shortcut errors that I didn't take the time to find until now. You can see these in design view (look for the green triangle in top left the corner of the controls). Here is a list of the captions. The offending ones are duplicated, as in &F and &N

&Undo : &U : btnUndo
&First : &F : btnFirst
&Previous : &P : btnPrev
&Next : &N : btnNext
&Last : &L : btnLast
Add &New : &N : btnAdd
&Save : &S : btnSave
&Delete : &D : btnDelete
Select &Filter Field : &F : Label28
Select Filter &Value : &V : Label30
 
Last edited:

CJ_London

Super Moderator
Staff member
Local time
Today, 00:35
Joined
Feb 19, 2013
Messages
16,553
Re: use a textbox as a resizeable and colourful checkbox

that's as far as I got - the controls need to be updateable so you need to enable them and also add in the code and the txtFocus control.
 

Micron

AWF VIP
Local time
Yesterday, 20:35
Joined
Oct 20, 2018
Messages
3,476
Re: use a textbox as a resizeable and colourful checkbox

I see that there is probably a non-unicode language setting incompatibility because not even the textboxes I added will accept the click event. I got a "blah, blah,a problem occurred while microsoft access was communicating with the ole server or activex control blah blah" error message.

@fhsmith - did you create your db on a pc set to some other language, or copy forms/code etc from such a pc? I suspect you left out something that the fancy form code needs too - or else that code and your db involve 2 different languages, perhaps.
I probably could copy/paste everything into a new db, but I'm done for now.
 

fhsmith

Registered User.
Local time
Yesterday, 19:35
Joined
Jul 18, 2019
Messages
11
Re: use a textbox as a resizeable and colourful checkbox

Many thanks for your hard work in trying to resolve this issue. I guess the older version of Access is the problem. I give up on it now and will live with the tiny check-off boxes.

Once again thanks and may you have the best of days. :)
 

fhsmith

Registered User.
Local time
Yesterday, 19:35
Joined
Jul 18, 2019
Messages
11
Re: use a textbox as a resizeable and colourful checkbox

Try this simplified version of the microgreen data base. Not sure of code to make the checkoff box work when clicking it. For example, when clicking the text box, it should make green X if not checked defaults to red X.





Versison of Access is 2002
 

isladogs

MVP / VIP
Local time
Today, 00:35
Joined
Jan 14, 2017
Messages
18,186
Re: use a textbox as a resizeable and colourful checkbox

You forgot to attach it!
 

CJ_London

Super Moderator
Staff member
Local time
Today, 00:35
Joined
Feb 19, 2013
Messages
16,553
Re: use a textbox as a resizeable and colourful checkbox

For example, when clicking the text box, it should make green X if not checked defaults to red X.
please check my original thread, suspect you did not read all of it - there is some code you need to add plus another control
 

fhsmith

Registered User.
Local time
Yesterday, 19:35
Joined
Jul 18, 2019
Messages
11
Re: use a textbox as a resizeable and colourful checkbox

see attached simple db
 

Attachments

  • test checkbox .mdb
    152 KB · Views: 75

fhsmith

Registered User.
Local time
Yesterday, 19:35
Joined
Jul 18, 2019
Messages
11
Re: use a textbox as a resizeable and colourful checkbox

See attached simple database. Maybe it will work - Access 2002 version
 

Attachments

  • test checkbox .mdb
    152 KB · Views: 81

CJ_London

Super Moderator
Staff member
Local time
Today, 00:35
Joined
Feb 19, 2013
Messages
16,553
Re: use a textbox as a resizeable and colourful checkbox

with respect, if you only read half a post no wonder you are experiencing issues. Go back to the original thread and read the rest of it.

Hint 1 - you have no code on the click event
Hint 2 - you have not added the textbox I called txtFocus
 

fhsmith

Registered User.
Local time
Yesterday, 19:35
Joined
Jul 18, 2019
Messages
11
Re: use a textbox as a resizeable and colourful checkbox

I tried youor codes for the txtfocus text box and for the text box that has the checkoff box. Get errors . I did all the things mentioned in your post but without success. Maybe the 2002 version of Access is causing the problem; or, I might have done something wrong.
 

Users who are viewing this thread

Top Bottom