473,503 Members | 1,805 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 1811
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_AfterUpdate

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

Jeff

"Deano" <de***@mailinator.com> wrote in message
news:43**********************@ptn-nntp-reader02.plus.net...
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_AfterUpdate
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
1130
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...
8
1539
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...
1
1919
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...
1
2237
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...
1
1916
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...
0
1035
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...
2
13132
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"...
3
1500
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...
3
1843
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...
0
7199
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,...
0
7074
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
7273
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
7451
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
5572
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,...
1
5000
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...
0
3161
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...
0
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
731
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.