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 / New Users / May 2004

Tip: Looking for answers? Try searching our database.

Yes/No buttons (follow-up to my previous question on this)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stephen Glynn - 29 May 2004 14:53 GMT
How do I use a Yes/No button on a form to set the Yes/No value of a
specific record in a table?   I've got several of these buttons which
I'll need to place on a single form.   When the operator has checked the
relevant buttons I want to run an append query to add the record IDs of
the selected records to another table.   Then I'll run an update query
to reset all the values in the source table to No.

Steve
Stephen Glynn - 29 May 2004 16:28 GMT
Answered my own question (I think):

SELECT tblMyTable.ItemID
FROM tblMyTable
WHERE (((tblMyTable.ItemID)=1)) and [Forms]![MyForm]![Check1]=True
OR
 (((tblMyTable.ItemID)=2)) and [Forms]![MyForm]![Check2]=True;

and then as many more OR clauses as I need.

Steve

> How do I use a Yes/No button on a form to set the Yes/No value of a
> specific record in a table?   I've got several of these buttons which
[quoted text clipped - 4 lines]
>
> Steve
tina - 30 May 2004 07:38 GMT
i'm thinking that's not going to work, but i'm not clear on what your table
structures. is your source table multiple records, with one ID field and one
Yes/No field? and does your "other" table have the same structure? and do
you want to append only the checkmarked records from the source table into
the other table? and then reset all the source table records to "unchecked"?
if so, your append query would be something like:

INSERT INTO OtherTableName ( CheckBoxField, ItemID, AddlField )
SELECT CheckboxField, ItemID, AddlField
FROM SourceTableName
WHERE SourceTableName.CheckboxField = True;

your update query to reset the source table records would be something like:

UPDATE SourceTableName SET CheckboxField = False;

hth

> Answered my own question (I think):
>
[quoted text clipped - 16 lines]
> >
> > Steve
Stephen Glynn - 30 May 2004 15:56 GMT
Sorry, I'd not made myself clear.   I was trying not to have a yes/no
field in the underlying table from which I was taking my values.
That's because I need to drop the check boxes individually all over the
form.   As you'll see from the other thread ("Yes/No boxes in forms" I'm
having trouble doing it in VB using the tag property.

Steve

> i'm thinking that's not going to work, but i'm not clear on what your table
> structures. is your source table multiple records, with one ID field and one
[quoted text clipped - 34 lines]
>>>
>>>Steve
 
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.