473,656 Members | 2,819 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A2K - how do I automate clicking of a checkbox?

I have a subform that is populated by a table that holds lots of yes/no
values. The user sees points at the side and then periods across the top.

So they decide they want point 20 for period 5 and go click that checkbox.
This in turn fires of various calculation code in the After_Update event of
the checkbox. This all works rather well.

I now need to check a given checkbox using code. I'm attempting to create a
recordset based on the table and then changing the value that way - however
this code isn't really working. The box changes but the associated events
aren't firing once this is done. I then try to call the required code but
now I'm getting error 3197 or the data has been changed.

So it would be cool if I could change a given checkbox via code to reproduce
exactly what happens the user clicks on it.

thanks
Jan 30 '06 #1
2 1825
When you set the value of a checkbox in code the events don't get triggered.

Call the events just like you would a sub or function. For example your code
may be something like this -

[chkBox] = True
chkBox_AfterUpd ate

This will execute the code in the event just as if you clicked on it.

Jeff

"Deano" <de***@mailinat or.com> wrote in message
news:43******** **************@ ptn-nntp-reader02.plus.n et...
I have a subform that is populated by a table that holds lots of yes/no
values. The user sees points at the side and then periods across the top.

So they decide they want point 20 for period 5 and go click that checkbox.
This in turn fires of various calculation code in the After_Update event
of
the checkbox. This all works rather well.

I now need to check a given checkbox using code. I'm attempting to create
a
recordset based on the table and then changing the value that way -
however
this code isn't really working. The box changes but the associated events
aren't firing once this is done. I then try to call the required code but
now I'm getting error 3197 or the data has been changed.

So it would be cool if I could change a given checkbox via code to
reproduce
exactly what happens the user clicks on it.

thanks

Jan 30 '06 #2
Jeff wrote:
When you set the value of a checkbox in code the events don't get
triggered.

Call the events just like you would a sub or function. For example
your code may be something like this -

[chkBox] = True
chkBox_AfterUpd ate
Thanks the only worry I'm left with is determined which row they've selected
for a given column. I'm trying to adjust my existing code still to get this
done, can't believe it can't be done.

Jan 30 '06 #3

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

Similar topics

0
1138
by: Vijay Neelam | last post by:
How can I automate Microsoft Word from ASP.NET. My requirement is like this I have Datagrid with checkboxes... I need to export checkbox selected rows into Microsoft Word. I tried to automate using vbscript got some problems on ASP.NET page the same code worked fine in .html file.
8
1546
by: Vijay Neelam | last post by:
How can I automate Microsoft Word from ASP.NET. My requirement is like this I have Datagrid with checkboxes... I need to export checkbox selected rows into Microsoft Word. I tried to automate using vbscript got some problems on ASP.NET page the same code worked fine in .html file.
1
1935
by: Vijay Neelam | last post by:
How can I automate Microsoft Word from ASP.NET. My requirement is like this I have Datagrid with checkboxes... I need to export checkbox selected rows into Microsoft Word. I tried to automate using vbscript got some problems on ASP.NET page the same code worked fine in .html file.
1
2243
by: .NETn00b | last post by:
Is this possible? I need to create a multi-select DataGrid, and I cannot use CheckBoxes. I want the selected rows to appear highlighted. One possible work-around that occurred to me was to devise my code in such a way as to allow the user to click anywhere in a DataGrid row, which would check the CheckBox for that row. Similarly, clicking again in the same row would un-check the CheckBox. The CheckBoxes in question would be invisible,...
1
1927
by: Liam.M | last post by:
I currently HAVE a form...a "Summary List" it could be called...which is a contineous form...AND on this form are "Four fields" from EVERY record (each on their own line) so to seak...like a running summary of ALL the Records in the Database! NOW upon clicking "one" of these lines...it then opens that specific Record in the Database...which is linked through and by a "Record ID"! The "four fields" that are exhibited in this contineous...
0
1042
by: satish | last post by:
Hi , I am automating internet. I am using mshtml and shdocvw.ddl for automations Can anyone tell me how to automate selection of items from list the e.g of html source is as given <select NAME="MPAN" tabIndex="0" size="15" onClick="uncheckallbox(this)" multiple> <option value="1014568057864">1014568057864 </option><option value="1014568661619">1014568661619 </option><option value="1014568985910">1014568985910...
2
13137
by: nitindutt2005 | last post by:
Hi I have a html file as below. ==================================================================== <html> <head> <td style="background-color:rgb(170, 157, 244);"> <table border="0" cellpadding="5" cellspacing="2" width="95%">
3
1511
by: Steffan A. Cline | last post by:
I have a script that will cycle thru a form and add a handler to the row so that if it is clicked it will check the checkbox within the row with basically cb.checked = !cb.checked. This part works great except if you click on the checkbox itself. It will also trigger the row. Am I missing an obvious way of how to avoid that? Reason, like I was saying. Clicking on the row toggles the checkbox but if the checkbox is unchecked and you check...
3
1851
by: Patrick | last post by:
Hi, Newbish on JS here. Found this script on the web and it does what I want in FF, but works oddly in IE. When I check the box in IE nothing happens, but when I click on the body after the box is checked it displays the dropdown. Any ideas on how to make this work correctly in IE (displaying the dropdown when box checked)? Thanks for your help. <html> <head>
0
8382
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
8816
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
8498
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
8600
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
7311
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...
0
4150
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...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
2
1930
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.