Need help hiding parts of form based on value in previous combobox

robbie_1234

Registered User.
Local time
Today, 08:06
Joined
Jul 17, 2011
Messages
13
I have a continuous survey form based on 2 tables, lookup table and survey table. The lookup table shows all the possible questions the survey table all of the possible answers. Most of the questions are designed with a combox plus a textbox for comments. I would like to do two things.
The survey was completed by adults and youth. I would like part of the form to be visible if the combo box for age shows adult and part of the form hidden if the combo box for age shows youth.

Secondly, I would like to hide the text boxes for the comments for each question if the particular completed survey only has combo box responses and no comments.

I followed an internet resource in designing the survey database, however, am having trouble with details to make the entry form user friendly.

Obviously, I am rather new to VBA and Access although I did take some classes years back on both.
 
Rather then trying to hiding part of the form why not hide the objects on the form?

on the after update event of the combo box add something like (Assuming the combobox only has one column or is bound to the visible column)

If Me.YourComboBoxName = "Adult" then
DoCmd.YourYouthObject1Name.visible = false
DoCmd.YourYouthObject2Name.visible = false
else
DoCmd.YourAdultObject1Name.visible = false
DoCmd.YourAdultObject2Name.visible = false
end if

Needs more initial work then hiding\veiling but you'll have greater control

SmallTime
 

Users who are viewing this thread

Back
Top Bottom