PC Review


Reply
Thread Tools Rate Thread

Change multple controls based on option change

 
 
Cappac
Guest
Posts: n/a
 
      19th Feb 2008
I have a situation where I need to display 10 to 20 questions with three
response
fields (approx 6 different forms). I'd like to create a single form and
populate it with
the 'maximum question count' worth of controls. Then use an option
button to select which questions get loaded and load the controls with the
appropriate values.

This way I only have one set of 'question controls' to deal with and can
create a function to call with the information to populate.

My big question is -- what is the best way to iterate through the 'question
controls' rather then naming each control? I will run a query to bring back
the data to load and also will need to hide any un-used questions. The
controls will be combox boxes and a text box
 
Reply With Quote
 
 
 
 
NetworkTrade
Guest
Posts: n/a
 
      20th Feb 2008
probably you want to consider visible/not visible rather than 'loading'....

it would be very straight forward to control which are visible....
--
NTC


"Cappac" wrote:

> I have a situation where I need to display 10 to 20 questions with three
> response
> fields (approx 6 different forms). I'd like to create a single form and
> populate it with
> the 'maximum question count' worth of controls. Then use an option
> button to select which questions get loaded and load the controls with the
> appropriate values.
>
> This way I only have one set of 'question controls' to deal with and can
> create a function to call with the information to populate.
>
> My big question is -- what is the best way to iterate through the 'question
> controls' rather then naming each control? I will run a query to bring back
> the data to load and also will need to hide any un-used questions. The
> controls will be combox boxes and a text box

 
Reply With Quote
 
Cappac
Guest
Posts: n/a
 
      20th Feb 2008
Yes I planned on making the controls visible/not visible -- one process may
only require 12 questions -- so I would hide 8 (assuming I placed 20 of each
control on the form).

When I say load - I mean to query a table(s) to fill the contents of the
combo boxes and lables. The query for Option 1 will be different then Option
2 or Option 3 etc..

So, I envision writing a funtion that I would pass the option value to. The
function will run a query based on that value - bringing back the data set
(into an array) along with the total questions being asked. I would then
create a For-Next loop and 'load' the array values into the controls. The
looping value would be used to address the array location and the controls
(combo1, combo2...). How do I create the control name by combining 'Combo'
and the loop value? So, if I want to do something like label1.caption = "some
array value" ----- I need to take label and the loop value to make label1.
I am not sure how to do that.

"NetworkTrade" wrote:

> probably you want to consider visible/not visible rather than 'loading'....
>
> it would be very straight forward to control which are visible....
> --
> NTC
>
>
> "Cappac" wrote:
>
> > I have a situation where I need to display 10 to 20 questions with three
> > response
> > fields (approx 6 different forms). I'd like to create a single form and
> > populate it with
> > the 'maximum question count' worth of controls. Then use an option
> > button to select which questions get loaded and load the controls with the
> > appropriate values.
> >
> > This way I only have one set of 'question controls' to deal with and can
> > create a function to call with the information to populate.
> >
> > My big question is -- what is the best way to iterate through the 'question
> > controls' rather then naming each control? I will run a query to bring back
> > the data to load and also will need to hide any un-used questions. The
> > controls will be combox boxes and a text box

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change multple table names rdcsfd Microsoft Excel Programming 6 15th Jan 2010 11:27 PM
Change criteria based off of Option Group Matt P Microsoft Access Queries 7 9th Jun 2009 06:04 PM
Change a query that a form is linked to based on some controls =?Utf-8?B?Tmlja19KYXBhbg==?= Microsoft Access Form Coding 6 16th May 2006 08:27 AM
Printing PDF outputting to multple files - change to 1 file =?Utf-8?B?QnJ1Y2U=?= Microsoft Excel Programming 5 24th Feb 2006 05:09 AM
Browse Forms Controls and change TextBox color based on cell color =?Utf-8?B?U3RlZmFuVw==?= Microsoft Excel Programming 0 21st Nov 2004 04:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:45 PM.