473,397 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

CheckBox Toggle - Access97.


I'm not a Newbie but I feel like one right now.

Here's what I did to reproduce a simple, simple problem.

1. Create a new Database.
2. Create a new Form.
3. Create a CheckBox on the form. (Check0)
4. Set the DefaultValue to True

5. In the OnClick Event, put the code:

Me!Check0 = Not Me!Check0

6. Save and Open the Form.

7. Click the CheckBox more times than a sane mane really should.

My problem is _not_ that I expected the "Tick" to come and go, come
and go, but instead see it sit there sullenly, refusing to budge.

My problem is that in about ten years of playing with Access, from
Access 2 until now, I'm SURE I must have used a click in an unbound
checkbox for something or other and had it behave as I'd expect.

I tried some of the "Oh, I forgot to.." kind of thing, such as
Me.Repaint and Me!Check0.Value, and I verified that it was my head (not
Access) that was broken by throwing on Command2 which simply repeated the
same code:

Sub Command2_Click()
Me!Check0 = Not Me!Check0
End Sub

That cheered up the CheckBox "Tick" no end, coming and going with each
successive click just as it ought.

In short (sorry, to late!)

I want an unbound CheckBox Check0 with Me!Check0 = Not Me!Check0 in the
click event and a Default Value of True to toggle from True to False when I
click the Control.

Please, could some kind person gently explain the blindingly obvious thing
I've overlooked?

Cheers,
Alan Carpenter
Nov 13 '05 #1
4 3995
Not sure what behavior you expect, when clicking the check box toggles its
value, and your code toggles it back?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Alan Carpenter" <al****@ihug.co.nz> wrote in message
news:ci**********@lust.ihug.co.nz...

I'm not a Newbie but I feel like one right now.

Here's what I did to reproduce a simple, simple problem.

1. Create a new Database.
2. Create a new Form.
3. Create a CheckBox on the form. (Check0)
4. Set the DefaultValue to True

5. In the OnClick Event, put the code:

Me!Check0 = Not Me!Check0

6. Save and Open the Form.

7. Click the CheckBox more times than a sane mane really should.

My problem is _not_ that I expected the "Tick" to come and go, come
and go, but instead see it sit there sullenly, refusing to budge.

My problem is that in about ten years of playing with Access, from
Access 2 until now, I'm SURE I must have used a click in an unbound
checkbox for something or other and had it behave as I'd expect.

I tried some of the "Oh, I forgot to.." kind of thing, such as
Me.Repaint and Me!Check0.Value, and I verified that it was my head (not
Access) that was broken by throwing on Command2 which simply repeated the
same code:

Sub Command2_Click()
Me!Check0 = Not Me!Check0
End Sub

That cheered up the CheckBox "Tick" no end, coming and going with each
successive click just as it ought.

In short (sorry, to late!)

I want an unbound CheckBox Check0 with Me!Check0 = Not Me!Check0 in the
click event and a Default Value of True to toggle from True to False when
I
click the Control.

Please, could some kind person gently explain the blindingly obvious thing
I've overlooked?

Cheers,
Alan Carpenter

Nov 13 '05 #2
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in
news:41***********************@per-qv1-newsreader-01.iinet.net.au:
Not sure what behavior you expect, when clicking the check box toggles
its value, and your code toggles it back?


AAAAAAAAARGGGHHHH!!!!!!!!!!!!

That's it, I'm now officially senile.

Please send soft toys and soft food c/o that guy over there with the white
coat.

Thanks, Allen. I'm a moron. I'm workin in too many differnt things and I'd
simply forgotten that Access did it for me without code.

Cheers,
Alan Carpenter
Nov 13 '05 #3
Hi,

I don't wish to appear argumentative; but why do you need any code?
Isn't the basic nature of the checkbox to check/uncheck on each
keypress? Delete the code and see what happens.

using A97

JimA
Alan Carpenter <al****@ihug.co.nz> wrote in message news:<ci**********@lust.ihug.co.nz>...
I'm not a Newbie but I feel like one right now.

Here's what I did to reproduce a simple, simple problem.

1. Create a new Database.
2. Create a new Form.
3. Create a CheckBox on the form. (Check0)
4. Set the DefaultValue to True

5. In the OnClick Event, put the code:

Me!Check0 = Not Me!Check0

6. Save and Open the Form.

7. Click the CheckBox more times than a sane mane really should.

My problem is _not_ that I expected the "Tick" to come and go, come
and go, but instead see it sit there sullenly, refusing to budge.

My problem is that in about ten years of playing with Access, from
Access 2 until now, I'm SURE I must have used a click in an unbound
checkbox for something or other and had it behave as I'd expect.

I tried some of the "Oh, I forgot to.." kind of thing, such as
Me.Repaint and Me!Check0.Value, and I verified that it was my head (not
Access) that was broken by throwing on Command2 which simply repeated the
same code:

Sub Command2_Click()
Me!Check0 = Not Me!Check0
End Sub

That cheered up the CheckBox "Tick" no end, coming and going with each
successive click just as it ought.

In short (sorry, to late!)

I want an unbound CheckBox Check0 with Me!Check0 = Not Me!Check0 in the
click event and a Default Value of True to toggle from True to False when I
click the Control.

Please, could some kind person gently explain the blindingly obvious thing
I've overlooked?

Cheers,
Alan Carpenter

Nov 13 '05 #4
JA*****@LeddyGroup.Com (Jim Allard) wrote in
news:74**************************@posting.google.c om:
Hi,

I don't wish to appear argumentative; but why do you need any code?
Isn't the basic nature of the checkbox to check/uncheck on each
keypress? Delete the code and see what happens.

using A97

JimA


No time to reply - I haven't finished kicking myself yet.

It was just a slight case (slight?) of brain-fade and language mix-up.

No offecne given or taken - both you and Allen were MUCH more polite than
my friends when I told them what I'd done. This morning I found my old
Commodore 64 on my desk nstead of my usual machine.

Sigh.

Alan "Never going to live it down) Carpenter

Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Targa | last post by:
I have a form in which I want to have an button(image) displayed next to a checkbox when it is checked. If the box is unchecked, the button should disappear. How can I do this? Thanks!
1
by: BK | last post by:
Dear all, I need help with access 2000. I have a form "Child" with subform "Grand" (3 levels). I have a toggle box in every record in the lowest level of the form for status. I want to have a...
0
by: Bruce D | last post by:
I have added a checkbox to my datagrid (programatically with 'DataGridBoolColumn'). It works great...except one thing...when I first click on the checkbox in my grid it doesn't do anything...it's...
4
by: deko | last post by:
Basic question about checking the value of Toggle/Check/Combo/OptionGroups.... Checking like this: If Me!chkCheckBox Then ... End If and like this:
2
by: John Smith | last post by:
How can I use a transparent command button to change a checkbox? I have my records set up in a continuous form and I want theuser to be able to click on the record and have this toggle the...
2
by: TGEAR | last post by:
there is one check box and if it is checked, then shows several fields underneath; otherwise, several fields are hidden. the default is unchecked. anyone can share the code for this function? ...
4
by: zufie | last post by:
I have two checkboxes on a form, ChckIBCCP and ChckOtherReferral. Each checkbox highlights its respective textboxes and combo boxes on the form. Many of the highlighted textboxes and combo...
4
by: ameshkin | last post by:
I have a checkbox with an ID of svc_tp_1, and an image that corresponds with this checkbox below it. <input type="checkbox" name="checkbox" id="svc_tp_1" value="svc_tp_1" / <img...
1
by: student4lifer | last post by:
Hello, I currently have a hyperlink to toggle the node, showing and hiding the list. Could someone show me how to use a checkbox instead of the hyperlink to do the same thing? Thanks. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.