Set all check boxes values on form

Hi everyone,

I have a table with 2 fields: Field1(Text box) and Fied2(Check box) in a form.

What i want is a command button to set all Field2 check box to YES, and a 
command button to set all Field2 check box to NO

Could anyone help me please????
-- 
Thanks, 

Sorry if my english isn''t correct, but I''m from Potugal ;)

Emanuel Violante Galeano
0
Utf
2/8/2008 10:53:00 AM
access 16762 articles. 2 followers. Follow

3 Replies
766 Views

Similar Articles

[PageSpeed] 25

In the Click event procedure of the command button:

    Dim strSql As String
    If Me.Dirty Then Me.Dirty = False    'Save first
    strSql = "UPDATE [Table1] SET [Field2] = TRUE WHERE [Field2] = FALSE;"
    dbEngine(0)(0).Execute strSql, dbFailOnError
    Me.Requery

Swap the TRUE and FALSE for the other button.

The Requery will take you back to the first record in the form.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Emanuel Violante" <EmanuelViolante@discussions.microsoft.com> wrote in 
message
news:63F84B76-9EB9-4BCF-BEA6-65B07AF0E65F@microsoft.com...
> Hi everyone,
>
> I have a table with 2 fields: Field1(Text box) and Fied2(Check box) in a 
> form.
>
> What i want is a command button to set all Field2 check box to YES, and a
> command button to set all Field2 check box to NO
>
> Could anyone help me please????
> -- 
> Thanks,
>
> Sorry if my english isn''t correct, but I''m from Potugal ;)
>
> Emanuel Violante Galeano 

0
Allen
2/8/2008 11:22:43 AM
It worked just fine ;)

Thank you verry much, 

Sorry if my english isn''t correct, but I''m from Potugal ;)

Emanuel Violante Galeano


"Allen Browne" wrote:

> In the Click event procedure of the command button:
> 
>     Dim strSql As String
>     If Me.Dirty Then Me.Dirty = False    'Save first
>     strSql = "UPDATE [Table1] SET [Field2] = TRUE WHERE [Field2] = FALSE;"
>     dbEngine(0)(0).Execute strSql, dbFailOnError
>     Me.Requery
> 
> Swap the TRUE and FALSE for the other button.
> 
> The Requery will take you back to the first record in the form.
> 
> -- 
> Allen Browne - Microsoft MVP.  Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
> 
> "Emanuel Violante" <EmanuelViolante@discussions.microsoft.com> wrote in 
> message
> news:63F84B76-9EB9-4BCF-BEA6-65B07AF0E65F@microsoft.com...
> > Hi everyone,
> >
> > I have a table with 2 fields: Field1(Text box) and Fied2(Check box) in a 
> > form.
> >
> > What i want is a command button to set all Field2 check box to YES, and a
> > command button to set all Field2 check box to NO
> >
> > Could anyone help me please????
> > -- 
> > Thanks,
> >
> > Sorry if my english isn''t correct, but I''m from Potugal ;)
> >
> > Emanuel Violante Galeano 
> 
> 
0
Utf
2/8/2008 11:48:01 AM
Your English is fine: no difficulty following you.

And you are very welcome.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Emanuel Violante" <EmanuelViolante@discussions.microsoft.com> wrote in 
message
news:5157B223-A228-4B6F-8D84-9CA6AD6609A8@microsoft.com...
> It worked just fine ;)
>
> Thank you verry much,
>
> Sorry if my english isn''t correct, but I''m from Potugal ;)
>
> Emanuel Violante Galeano 

0
Allen
2/8/2008 1:41:32 PM
Reply:

Similar Artilces:

setting up new outlook mail account
i can not set up a new account on my outlook, i keep saying establish network connection with a correct sign but searching for my mail account shows X can you please advise Are you trying to setup a POP3 mail account or an Exchange account? Also, what version of Outlook are you using? "rashid" <rashid@discussions.microsoft.com> wrote in message news:C59D04C0-C1C9-4BD1-AE00-2009D25B221D@microsoft.com... > i can not set up a new account on my outlook, i keep saying establish > network > connection with a correct sign but searching for my mail account shows X > ...

How do I set up an argument which asks for multiple criteria
I am trying to use an argument that asks for one of three criteria (2345P, 8319T, or 7026J) in cell C108, and if it finds it, enters the amount of yet another cell, G108 into cell K108, and if not enters 0 into cell K108. It seems there are too many arguments for the "if" argument, and I can't seem to get the "lookup" argument to work either. Is there another argument I should be working with? Thanks -- Diver Try: =IF(OR(C108="8319T",C108="2345P",C108="7026J"),G108,0) "bj" wrote: > try in K108 > =if(or(c108=&qu...

one label all forms
I want to put a label on all my forms that says YOU ARE IN ARCHIVE. Can I do this without placing a label on each form? Thanks. You could set the form's Caption to that. That would mean that it would appear in the bar at the top of the form. However, you'd have to set it, so I don't know whether that'll save you anything. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "seeker" <seeker@discussions.microsoft.com> wrote in message news:E4FC21F1-32F8-4A6E-A33B-EC9B18F9617D@microsoft.com... >I want...

Linked form can't be edited
I have a large table with contact details and also additional details which only relates to about a third of my clients. If I include all the fields in my main input form(1) it becomes very cluttered so I have created another form(2) for just the additional information and select it with a button from form(1). Form(2) is filtered according to the client in form(1). However even though I have enabled editing in the properties box, I am unable to edit the form(2) fields. Without the filter it works fine, but I have to find the client manually to add the additional information. What...

OWA Set Rule problem
I have successfully install the Exchange 2003 with SP1 in the Windows Server 2003. Anything alright exclude the rules function in OWA. I try to set the rules from any then "move to" or "copy to" specify folder are no problem, but "forward to" other email address, its don't work. I try to input the email address in the contact and then select from the contact, but the result also don't work. The rules can save and I can receive the incoming email in the Exchange 2003/Outlook or OWA, but it don't forward to my specify email address. I try to...

How do I set the 'Set Synchronizing Client' field
We have a number of outlook clients using CRM that have the 'Set Synchronizing Client' select box greyed out. We need to tick them so that they are able to synchronize tasks etc. Can any one help me find out why these are greyed out and then set them so that they can synchronize thanks In my experience, that checkbox is always greyed out for the first install that is performed for a user. The only time that checkbox becomes active is if a second copy of CRM is installed for a user who already has CRM installed on another PC.... Normally the box is checked and grey. If that is...

Formating text of x-axix value
I make a chart with x-axix values from let's say 1E-9 to 1E-3, using logaritmic scale. So far so good. But my need is not to display the values in the chart like 1E-9, 1E-8, etc. but like 10-9, where the -9 text will be formated as upper index. Thx for any help or suggestion. see http://www.stfx.ca/people/bliengme/ExcelTips/Exponents_in_Cells_and_Charts.htm best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "Karel" <Karel@discussions.microsoft.com> wrote in message news:DA5042AE-A412-4CB3-B823-89741DAF8FFD@microsoft.com... >I mak...

How to set backcolour
Hello All I have a continuous form containing a number field (long integer) called [v_colour]. This field contains the number of a certain colour - as per the numbers that are used in the format properties for back colour etc. I would like to set the back colour for the form's [v_colour] text box to be the value of the field: e.g. If the value of [v_colour] in the first record is 255, I want the back colour of the textbox for that record to be bright red. I tried this as the OnLoad event for the form: [v_colour].backcolour = [v_colour].value .... but this resulted in the back colour of...

Forms Combo Box
Does anyone know haw to make the Forms Combo box font bigger?? No can do. You could try the Controls toolbox one, but not recommended if usin several controls because these ones are very buggy. More properties more trouble -- Message posted from http://www.ExcelForum.com ...

Display cell contents in a text box (shape) and linking
Dear Experts: below macro grabs the contents of cell B7 and displays it in a text box (shape, not a control!). How do I have to re-write the code to have the contents of the cell linked to the contents of the shape. That is, whenever the cell contents changes, the contents of the text box is to be updated as well. Help is much appreciated. Thank you very much in advance. Regards, Andreas Sub AddTextBox() ActiveSheet.Shapes.AddTextBox(msoTextOrientationHorizontal, 97.5, 28.5, 96.75 _ , 17.25).Select Selection.Characters.Text = Range("B7") With Sel...

Applying Percent Decrease Across Set Periods
I have a column which includes dates when items were purchased. I have used the DATEDIF function to find the number of years between that date and today's date. I now want to decrease the purchase amount 10% for every year calculated via the DATEDIF function. Any ideas, is this possible, why can't I think...? -- Hunt&amp;Peck ------------------------------------------------------------------------ Hunt&amp;Peck's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=32961 View this thread: http://www.excelforum.com/showthread.php?threadid=527873 ...

Mega Newbie
MS Exchange V5.5 with Outlook 2000 clients. The size of our exchange databases seem to be growing at a serious rate. I believe that the files priv.edb and pub.edb are the user folders and public folders respectively - can someone confirm this please? Our file sizes are 1Gb for priv and 3Gb for pub. This means at least some users have a serious allocation for their user folders - total number of users approx 30! Is it possible to examine the system via exchange to find out which user's folders are taking up all the space? TIA Phil Hi There, >-----Original Message----- >MS Ex...

Set Regional Settings but not Language
Hi I have a multi-language APP en-US, es-ES, it-IT I usually change Languages and Locales by using the CultureInfo to switch Languages System.Globalization.CultureInfo myCI = new System.Globalization.CultureInfo("es-ES"); My issue is - what if the user wants to View App in english and use the Regional Options on a PC in say Spain ??? If I change the CultureInfo to en-US then they can view APP in English ( English satelite assemblies) but date and numbers will be in US format If I change the CultureInfo to es-ES then date and numbers will be in Spain forma...

can't resize a text box basic
I am creating some software flow diagrams. I add a box and try to add some text. I want the text to be on the box but it ends up being really long and I can't figure out how to re-size it. It ends up being too long. It disappears when I go back to working with the box. When I go to text mode then the text box is too long but I can't figure out how to delete it or resize it to fit on my box. Then I go back to the shape mode and the text box disappears. tia, Hello J, Have a look at this post: http://blogs.msdn.com/visio/archive/2006/08/15/694710.aspx If you haven't come a...

Sharing Contact Forms on Exchange 2003
I have a user that created contact forms using Outlook (Office 2003). Server side, I have Exchange 2003 running on SBS 2003. The user would like to share these forms with the organization. What is the best way to publish the custom contact forms in Exchange 2003? Dragging the form to the public folders copies the data, but nothing more. Thanks in advance, J Wolfgang Goerlich ...

Reading Pane Settings
I did a search for an answer to this question and have not found one. If I missed an answer already posted, please direct me to the right place. I have Outlook 2007 and set up the "right" reading pane for my e-mail. Now when I go to my calendar it is set up the same way - calendar on the left (same size as the inbox) and then there is a blank space to the right that is the size of the reading pane/preview. To the right is the to-do bar (which I have no problem with). I don't know why there is a reading/preview pane on the calendar when there is nothing to preview, and I...

Work Hours setting excludes specified hours from Scheduling
I am miffed by this problem. I specify a work hour schedule for a user. When I schedule a CRM User as a Resource for a Service in Scheduling of a Service Activity with Requested Time of ASAP and click Find Available Times, the values for Avilable Times returned are outside of the Work Hours I specified for the user and not within the work hours. When I drill into the Work Hours for this User, the Calendar view shows Cross Day rather than 8:00AM - 5:00PM I speciied for work hours and editing the hours reveal the correct hours in the Work Hours. What gives? Never mind. Figured out w...

Check these internet pack from Microsoft Corporation
--erowouqok Content-Type: multipart/related; boundary="tjatkkfljaxofz"; type="multipart/alternative" --tjatkkfljaxofz Content-Type: multipart/alternative; boundary="knbfvepdjx" --knbfvepdjx Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Microsoft Partner this is the latest version of security update, the "September 2003, Cumulative Patch" update which eliminates all known security vulnerabilities affecting MS Internet Explorer, MS Outlook and MS Outlook Express. Install now to maintain the security of your computer from these v...

synchronize sub forms-part 2
Don't see my earlier post... here I go again! Scenario: Main form (1)- frm1 based on tbl01 User enters 3 parameters to filter by p1,p2,p3 Subforms (6)- fsub1-fsub6 (each with its own tab) also based on tbl01 ALL subforms are Linked to frm1 through 2 fields (p2,p3) When the 3 parameters are chosen fsub1 will list the basic info associated with them. fsub2-fsub6 will list more specific info. With the following additions suggested by Robert Carlson: fsub1 On current Event: Forms![frm1]![fsub2].Requery fsub2 On Current Event: If IsNull(Forms![frm1]![fsub1].Form!ID) = False Then ...

Outlook "Arrange By" option does not retain its setting
In outlook 2007, I use a custom view for my inbox, and I have the Group By option checked to"Automatically group according to arrangement." This has been workn flawlessly until today, when I realized Outlook did not like a particular mouse click; perhaps I clicked on the border of two options or some other anomoly that caused the window toflash once. The end result was that my Arrange By option changed to "From" when I had previously set it to "Conversation." Now, whenever I hange it backto "Conversation," leave the inbox and come back, ...

Need to sum values that are not strikethroughs
I need to sum a column without it adding the rows that have strikethroughs values; is it possible to combine a formula and vb code to a cell ? =SUM(BH100:BH120) & Activecell.selection.font.strikethrough = false Thank you Khf Try: Function zum(r As Range) As Double Dim rr As Range For Each rr In r If rr.Font.Strikethrough = False Then zum = zum + rr.Value End If Next End Function In the worksheet use it like: =zum(A1:A10) -- Gary''s Student "Rock" wrote: > I need to sum a column without it adding the rows that have strikethroughs > values; i...

Propagate Lead Form Changes
I added some new values for Lead Source in the Lead form yesterday. My IT manager who's unavailable and normally does this sort of thing told me that many changes like this just "take a while" to propagate out system wide. How long does it take, or do I need to do something to publish my changes? I can see that they're saved because if I go back to edit the values for that field, they're all in there. Thanks Nathan, You need to publish the changes from the deployment manager. Usually you need to restart IIS (just Start - Run - iisreset will do the trick). T...

interactive buttons, multiple sets
hi folks I'm sure one of you good folks will save my bacon as usual I have a series of websites, all of which exhibit the same odd behavior with interactive buttons. I have a bunch of buttons in the left margin, each of which pulls up ( lets call it ) a chapter, and in each 'chapter' are a number of related pages. On the top of each page is an imbedded page which has 'page numbers' for all the 'pages' in that chapter. So, it's a grid where the 'vertical' buttons in the left margin and the 'horizontal' buttons at the top comb...

Provide Help/Tutorial Form
I'd like to add a form to an operational database that the users can look at for info on how to use the application; what to do if errors occur; etc. What is the best way to provide the information ? A TextBox is limited to 255 characters; A MemoType has 64K characters; An Attachment - requires availability of the underlying product (Word, etc.). A LabelType field ? Recommendations ? If you are using only a single form or a couple of forms, put the info into a label control, or several label controls. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia ...

How do I set OOR
I have searched the help menu and have had no luck finding out how to set my outlook 200 to send an OOR (Out of Office Reply) Any assistance would be great If you are in an Exchange environment (ask your administrator if you do notknow) you can set the Out of the Office Assistant which is located under Tools. If you are not in an Exchange environment you can create a rule that replies on all e-mails. The downside of this is that you'll have to have your Outlook open all the time for the rules to process. Make sure you set some exceptions (for instance based on the subject field so ...