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 / December 2005

Tip: Looking for answers? Try searching our database.

Properly using checkboxes in a datasheet form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brent Ritchie - 17 Dec 2005 18:55 GMT
Hello,

   I want to use check boxes on a form in datasheet form that has a query
for a controlsource. Here is the basics of it:

   I created a query that will return all the fields in one table then in
the next cell I am returning a value of -1 or 1 depending if one field in
both tables are the same (This is used for the checkbox). On the form is one
textbox and one checkbox that reflect the query when run, This is ok. My
problem is that when I try to click the checkbox I get a "Recordset is not
updateable" warning in the bottom left hand corner. All I want it to do is
execute the code in my clickevent handler which deletes or adds a field into
one of my tables and then requeries the query. I figured I could unbind the
checkbox, but I don't know how to keep the data in sync. Can anyone help?

   I would rather not unbind my checkbox to the query I'm just looking for
a way to execute the code in my click event.
Brent Ritchie - 17 Dec 2005 19:25 GMT
Just for clarification I have my sql view code for the queries.

query 1:
SELECT tblCodeJurisdiction.Jurisdiction, IIf(IsNull([SiteID]),0,[SiteID]) AS
[This Site]
FROM tblCodeJurisdiction LEFT JOIN qrySubSiteJurisdiction ON
tblCodeJurisdiction.JurisdictionID = qrySubSiteJurisdiction.JurisdictionID;

query 2: (qrySubSiteJurisdiction)
SELECT tblSiteJurisdiction.SiteID, tblSiteJurisdiction.JurisdictionID
FROM tblSiteJurisdiction
GROUP BY tblSiteJurisdiction.SiteID, tblSiteJurisdiction.JurisdictionID
HAVING (((tblSiteJurisdiction.SiteID)=[Forms]![Transaction Info]![SiteID]));
Brent Ritchie - 17 Dec 2005 19:58 GMT
Actually sorry,

   I just figured it out, It was the GROUP BY clause that was making things
break. I just removed it and changed the HAVING clause to a WHERE clause.

> Just for clarification I have my sql view code for the queries.
>
[quoted text clipped - 11 lines]
> HAVING (((tblSiteJurisdiction.SiteID)=[Forms]![Transaction
> Info]![SiteID]));
 
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.