Sign Up |  Live StatsLive Stats    Articles 35,345| Comments 159,788| Members 17,820, Newest waheguruhelpme| Online 219
Home Contact
 (Forgotten?): 
    Sikhism

   
                                                                     Your Banner Here!    

check - uncheck in a continuous form

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 400 USD, Received: 35 USD (9%)
Please Donate...
Related Topics...
Thread Thread Starter Forum Replies Last Post
HOW DO I UNCHECK A COLUMN OF CHECK BOXES? mommyone Information Technology 3 28-Jul-2006 08:40 AM
Background color change on exit of records on continuous form H2OBOWL Information Technology 1 28-Jul-2006 08:31 AM
Loop through a continuous form changing Yes/Know Ctls. to Yes. Buddy Information Technology 4 09-Nov-2005 17:51 PM
Check uncheck all checkboxes VB Information Technology 3 07-Nov-2005 11:26 AM
“Print Warning” when Printing a continuous type form EdGrenzig Information Technology 2 04-Nov-2005 15:19 PM


Tags
check, uncheck, continuous, form
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:04 AM
jean.ulrich@snclavalin.com's Avatar jean.ulrich@snclavalin.com
Guest
 
Posts: n/a
   
   
check - uncheck in a continuous form

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
Hi

I have an unbound form name "Letter "
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/9602-check-uncheck-in-a-continuous-form.html
On this form I have a continuous form named "frmEmployees" linked
with the table "tblEmployees"
In the continuous form I have many fields including "City" and
"Choice" both linked with table "tblEmployees"
Field "Choice" is a check box (yes/no)
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9602

Suppose I make a filter on New-York city, I want to use a button placed
on the from header of the "frmEmployees" that when I click on it
all the check boxes "Choice" for New-York will become checked.
Then I filter for Denver and by clicking the same button, all the
"Choice" check boxes for Denver will be checked
Of course I can check some other records if I want
So at the end all check boxes for New-York all check boxes for Denver
plus all other single boxes I have check are checked.

I also want a second button that I will use to uncheck all check boxes.

Thanks for helping me




 
Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:04 AM
Allen Browne's Avatar Allen Browne
Guest
 
Posts: n/a
   
   
Re: check - uncheck in a continuous form

Use the AfterUpdate event procedure of the unbound check box to execute an
Update query statement so that all the entries matching the form's filter
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9602
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9602
are set to Yes

Private Sub chk1_AfterUpdate
Dim strSql As String
If Me.chk1.Value And Me.FilterOn Then
If Me.Dirty Then 'Save first
Me.Dirty = False
End If
strSql = "UPDATE [Table1] SET Choice = True WHERE " & Me.Filter
dbEngine(0)(0).Execute strSql, dbFailOnError
End If
End Sub

To reset all boxes to unchecked again, execute this string:
strSql = "UPDATE [Table1] SET Choice = False WHERE Choice = True;"

--
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.

wrote in message
news:1147598828.640995.240100@g10g2000cwb.googlegr oups.com...
>
> I have an unbound form name "Letter "
> On this form I have a continuous form named "frmEmployees" linked
> with the table "tblEmployees"
> In the continuous form I have many fields including "City" and
> "Choice" both linked with table "tblEmployees"
> Field "Choice" is a check box (yes/no)
>
> Suppose I make a filter on New-York city, I want to use a button placed
> on the from header of the "frmEmployees" that when I click on it
> all the check boxes "Choice" for New-York will become checked.
> Then I filter for Denver and by clicking the same button, all the
> "Choice" check boxes for Denver will be checked
> Of course I can check some other records if I want
> So at the end all check boxes for New-York all check boxes for Denver
> plus all other single boxes I have check are checked.
>
> I also want a second button that I will use to uncheck all check boxes.
>
> Thanks for helping me



Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:04 AM
jean.ulrich@snclavalin.com's Avatar jean.ulrich@snclavalin.com
Guest
 
Posts: n/a
   
   
Re: check - uncheck in a continuous form

Hi
there is no unbound check box
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9602
Check box "Choice" is a field in "tblEmployees"
so i cannot us the after update event like you said
Script should be place on the On Click event of the button

thanks

Reply With Quote
  #4 (permalink)  
Old 28-Jul-2006, 08:04 AM
Allen Browne's Avatar Allen Browne
Guest
 
Posts: n/a
   
   
Re: check - uncheck in a continuous form

Okay. Put the code in the click event of your command button.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9602
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9602
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

wrote in message
news:1147608423.445336.60550@j55g2000cwa.googlegro ups.com...
> Hi
> there is no unbound check box
> Check box "Choice" is a field in "tblEmployees"
> so i cannot us the after update event like you said
> Script should be place on the On Click event of the button
>
> thanks



Reply With Quote
  #5 (permalink)  
Old 28-Jul-2006, 08:04 AM
jean.ulrich@snclavalin.com's Avatar jean.ulrich@snclavalin.com
Guest
 
Posts: n/a
   
   
Re: check - uncheck in a continuous form

  Donate Today!  
Thank Allen

The code was ok to put on the button except for the
"If Me.chk1.Value And Me.FilterOn Then "
that I have to replace by
"If Me.FilterOn Then "

Thanks gain, it works fine now
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9602

Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Gurbani Jukebox
Listen to Gurbani while surfing SPN!
» Active Discussions
sikhism Who is "Mohan"?
Today 06:52 AM
21 Replies, 319 Views
sikhism need urgent advice.......
Today 06:46 AM
6 Replies, 72 Views
sikhism ਨਾਮਾ
Today 06:37 AM
2 Replies, 45 Views
sikhism Sikh Diamonds Video...
Today 04:23 AM
6 Replies, 112 Views
sikhism Are Creator and Creation...
Today 01:30 AM
44 Replies, 2,833 Views
sikhism Herman Hesse,...
Today 00:54 AM
13 Replies, 225 Views
sikhism On a Scale of Most...
Yesterday 21:42 PM
30 Replies, 1,277 Views
sikhism I became victim by...
Yesterday 19:50 PM
0 Replies, 39 Views
sikhism How important is Matha...
By Ishna
Yesterday 19:05 PM
58 Replies, 1,026 Views
sikhism Sikh Books downloads
Yesterday 15:39 PM
2 Replies, 62 Views
sikhism Salok Sheikh Farid ji...
Yesterday 09:35 AM
0 Replies, 43 Views
sikhism In Punjab, three farmers...
Yesterday 05:36 AM
0 Replies, 45 Views
sikhism Supernatural Sikhs, what...
Yesterday 03:45 AM
19 Replies, 408 Views
sikhism Sukhmani Sahib Astpadi...
26-May-2012 22:57 PM
0 Replies, 46 Views
Do You Think You Are...
26-May-2012 09:59 AM
94 Replies, 8,258 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.2

All times are GMT +6.5. The time now is 07:40 AM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.2 Copyright 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.37382 seconds with 30 queries