Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 19th, 2006, 02:19 PM
Authorized User
 
Join Date: Aug 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update Subform

I am trying to create a form that has 4 sets of check boxes in one column (related to one field in a table) and 5 sets of check boxes in another column (related to another field in the same table) and finally I have a subform that I want to update like a query as the checkboxes are checked or unchecked. The subform should show the third field from the same table. I have tried everything I can think of from on click macro's to on update expression builders with no luck...Please help...
 
Old December 20th, 2006, 08:23 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

When you say "4 sets" do you mean 4 check boxes, or 4 groups of x number of check boxes.

In any event, should you be using an Option Group? Can you check multiple boxes and have a value inserted, or does the user check one of the group?

What do you want to display in the subform (how is it conditioned by the check boxes)? And why a subform? Perhaps you can use a list box and populate that with data from the single field.

mmcdonal
 
Old December 20th, 2006, 08:51 AM
Authorized User
 
Join Date: Aug 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

by 4 sets I mean 4 check boxes in a column, and yes multiple selections are needed.

EXAMPLE:
------------------------------------------------
Check box 1a Checkbox 1b --Subform--
Check box 2a Checkbox 2b [ ]
Check box 3a Checkbox 3b [ ]
Check box 4a Checkbox 4b [ ]
                         Checkbox 5b [ ]

The data that is going into it is for training. essentially there are 4 different levels of training, some people are required to know more than one level. within each level there are 5 categories of training. I'm not sure if a subform is the best way of doing this (I'm very green at this stuff). Currently each training exercise is saved as a web page, which I have linked into the DB. I am using the subform to select the one that's needed, which should display the page on screen or print it.
 
Old December 20th, 2006, 08:57 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

So what combinations of check boxes does the user select, and what should happen when they select them?


mmcdonal
 
Old December 20th, 2006, 09:54 AM
Authorized User
 
Join Date: Aug 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

They should be able to select their level(s) (1-4) and then the category or categories that apply to them. that should populate the subform with the different training pages from there they can select to view them on screen or print them.
 
Old December 20th, 2006, 10:09 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

So they would select level 1, let's say, from the first column, and then a category or categories from column 2, and then the selections would be assessed and the proper link would appear in the "subform" column?



mmcdonal
 
Old December 20th, 2006, 10:30 AM
Authorized User
 
Join Date: Aug 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, that is it. but there are situations where the person using this tool would need both level 1 and 2 or 1 and 3 and so on and so on... but yes that is the concept.
 
Old December 20th, 2006, 11:37 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

So give me an example then:
User selects level 1 and 2, and then category 1 and 4.

How would you evaluate that? Do you want a string that says
"Level 1, Level 2, Category 1, Category 4"

Or would it return some other value based on the selections?


mmcdonal
 
Old December 21st, 2006, 09:34 AM
Authorized User
 
Join Date: Aug 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok... the tables that these are pulling from have several fields, the first filed is level (Duplicates allowed) which is where the 1 thru 4 is dirrived from. the socond field has the categories (Duplicates also allowed) which contains the five categories, move, communications, etc... And finally Task number which contains the number assigned to each task. I hope this is what you are asking about..
 
Old December 21st, 2006, 09:48 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Okay, almost there. Give me an example: User clicks x, y, and you want to display what? Where do you want to save the data? DO you just want to save check boxes, or do you want to save the text results of the clicks? If the last, where do you want to save that?


mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Update field on all selected records in a subform S300570 Access 1 January 14th, 2008 02:19 PM
Subform Record Saved, Update/Requery Form controls CB-VTXer Access VBA 2 August 6th, 2007 02:35 PM
Update subform results? dstein4d Access VBA 0 February 8th, 2006 05:23 PM
subform update problem Derek_05 Access 8 February 3rd, 2006 01:22 AM
auto-update multiple records in subform stoneman Access 1 February 8th, 2004 12:19 AM





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