how to create dynamic check boxes

sunilvedula

Sunil
Local time
Tomorrow, 04:32
Joined
Jan 18, 2007
Messages
138
hi all,

i have a form on which there are list boxes which populate a set of question based on the selection of the previous list boxes. Now i want to be able to populate check boxes for all the question that populate on the list boxes so that the user can check them. The question can vary based on the selection of the previous list boxes. How to do?
 
is this like,,, questions and answer option,,??
you mean:choose question1 for example, checks automaticly the check boxes associated with it...??
or what?
 
Try using the .Visible property on your secondary checkboxes, triggered from the OnChange event of the primary checkbox. Don't forget the labels!

You'll also probably have to do the same formatting in the Current event, to show the right options when you reload the record later.
 
hi all,
Thanq for ur replies. It is not question and answer type. I am not definign the check boxes at all. I will try explaining clerly.
i have 3 list boxes. The first one gets populated when they select an option from a combo box e.g if they select credit card it throws 10 different options of bank names in the first list box. when they select a bank on the 1st list box then it throws different question based on the selection in the list box 2. Now based on the selection of list 2 it throws a set of question in list box 3. all this is working properly but i want check boxes also to be shown based on the number of questions. I dont want to place check boxes initally make them invisible and then make them visible based on the selection. what i require is dynamic creation of check boxes based on the number of question that it populates. The reason is the number of question will vary and also they can be increased at a later stage. If i give a defined set then it will require me to recode it if questions increase. Hope i am clear.
 
I think you'll want to search the forums for Cascading List Boxes. There should be numerous examples already of what you're after, and the method should adapt to checkboxes fairly simply.
 
If i give a defined set then it will require me to recode it if questions increase. Hope i am clear.
Access does not work like VB6 where you can create controls on the fly. It is not just a simple task. You need to open the form in design view and then create the control and then the code to bind it and then you have to save the form and then reopen it.
 
Access does not work like VB6 where you can create controls on the fly. It is not just a simple task. You need to open the form in design view and then create the control and then the code to bind it and then you have to save the form and then reopen it.

Hi Bob,
I have seen ur answers to many posts earlier. Those have been quite healpful. Thanq for your response. So now can i fairly assume that it is not feasible to create check boxes on the fly. if i have to do i need to go back to develp mode and do it. If you can confirm the same i will stop checking for ways to do it in access.
 
Hi Bob,
I have seen ur answers to many posts earlier. Those have been quite healpful. Thanq for your response. So now can i fairly assume that it is not feasible to create check boxes on the fly. if i have to do i need to go back to develp mode and do it. If you can confirm the same i will stop checking for ways to do it in access.

Yeah, it isn't one of Access' strong points for dynamic control creation. I usually put a bunch of the control I will need on the form and then just manipulate those with code if I need to. It isn't elegant by any means but there aren't many options for this type of thing.
 

Users who are viewing this thread

Back
Top Bottom