473,657 Members | 2,535 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4021
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*********@Se eSig.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?


AAAAAAAAARGGGHH HH!!!!!!!!!!!!

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.c o.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*****@LeddyGr oup.Com (Jim Allard) wrote in
news:74******** *************** ***@posting.goo gle.com:
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
6663
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
2325
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 toggle box in the parent form (2nd level) that when I update it, all the toggle boxes in the subform are updated, but I still have the ability to update the toggle box manually and individually. If I set the recordsource to equal to the field in...
0
312
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 like its only getting focus (it's not grey). After the initial click, I can toggle the checkmark. The one thing I notice is the record pointer in the datagrid. On the first click (into the cell), it's still an arrow. But when I start to toggle...
4
8956
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
11416
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 "Print" checkbox. the command button would be set up as transparent and cover the entire record.
2
8852
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? <table> <tr><td><input type="checkbox" name="vehicle" value="N" /><td></tr> <tr><td><input type="text" name="color" value="test" /><td></tr> <tr><td><input type="text" name="shape" value="test" /><td></tr>
4
3348
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 boxes are the same for either checkbox selected. Some of the highlighted textboxes and combo boxes differ depending upon which checkbox is selected.
4
6155
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 src="images/screen_print.jpg" onclick="toggle('svc_tp_1'); return true;" /> I know how to get the checkbox to check when the image is clicked, but what I really want is a toggle. When a user clicks on the image, the system should first check to see if svc_tp_1...
1
2986
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 tried the following line but the node's nextSibling becomes instead of <div>. Then I tried node. nextSibling.nextSibling but it didn't work. Please help!
0
8413
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8842
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7352
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2742
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.