Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / January 2006

Tip: Looking for answers? Try searching our database.

A2K - how do I automate clicking of a checkbox?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Deano - 30 Jan 2006 12:53 GMT
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
Jeff - 30 Jan 2006 13:25 GMT
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

>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.
[quoted text clipped - 17 lines]
>
> thanks
Deano - 30 Jan 2006 14:18 GMT
> When you set the value of a checkbox in code the events don't get
> triggered.
[quoted text clipped - 4 lines]
> [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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.