Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 17th, 2004, 10:21 AM
Ben Ben is offline
Authorized User
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default Continuous Forms

I have a form with the default view set to Continuous forms, the form diplays a dynamic amount of records returned from a query.
The last field in the query is a check box, I want to create a button in the form footer that will check all the check boxes displayed on the form.
[Stupidly] I tried chkbox.value = true, but this only applies to the first record (form) displayed.
I guess I'm going to have to do a for each, next loop but I'm unsure what to apply this to. Can anyone help!

Thanks in advance
Ben
Reply With Quote
  #2 (permalink)  
Old February 17th, 2004, 10:31 AM
Authorized User
 
Join Date: Jun 2003
Location: Glendale, AZ, USA.
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ben,
  You can use the recordsetclone object if there aren't a ton of records to perform this update.

  In the click event of the button put this code

  Do while not me.recordsetclone.eof
     me.recordSetclone.Edit
     me.chkbox.value = True
     me.recordsetclone.update
     me.recordsetclone.movenext
  loop
  me.refresh

  Another alternative, faster alternative, would be to create an update SQL statement that would update all the records in a single pass. Ensure that it contains the same where clause as the recordsource for the form.

HTH,
Mike
Reply With Quote
  #3 (permalink)  
Old February 17th, 2004, 10:34 AM
Ben Ben is offline
Authorized User
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Mike that helps a lot :)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Populating Continuous Forms Bobbyworld Access VBA 8 May 13th, 2007 03:28 AM
continuous forms question hamffjs Access 3 January 29th, 2007 01:33 PM
Checkboxes and continuous forms mdProgrammer Access VBA 4 August 3rd, 2006 09:47 AM
Continuous Forms Issues strikeuk Access 1 January 2nd, 2006 11:59 AM
2 synchronous combos in continuous forms Cr0vaX Access VBA 3 May 22nd, 2004 11:40 AM



All times are GMT -4. The time now is 05:37 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.