Forms & Subforms

G

Guest

Hello,

I have a form with a combo box and a subform. When the user selects the
appropriate name from the combo box, the subform displays the information. My
question is, how do I get the subform to refresh if the user selects a
different name? Example: (step 1) when the form opens, John Doe selects his
name from the combo box and the subform displays the desired data. (step 2)
After viewing that data, he selects Jane Doe from the combo box. Now the
subform should refresh and display the data pertaining to Jane Doe.

Currently, I can only get step 1 to work. Please help me to get step 2 to
work.
Also, is there a way to make the subform visible only after a name has been
selected from the combo box?
 
R

Rick Brandt

HL said:
Hello,

I have a form with a combo box and a subform. When the user selects
the appropriate name from the combo box, the subform displays the
information. My question is, how do I get the subform to refresh if
the user selects a different name? Example: (step 1) when the form
opens, John Doe selects his name from the combo box and the subform
displays the desired data. (step 2) After viewing that data, he
selects Jane Doe from the combo box. Now the subform should refresh
and display the data pertaining to Jane Doe.

Currently, I can only get step 1 to work. Please help me to get step
2 to work.
Also, is there a way to make the subform visible only after a name
has been selected from the combo box?

What are you doing to get step 1 to work?

You should be able to just set the MasterLink and ChildLink properties of
the subform control for this to work with no code required.
 
G

Guest

What is the control source for the subform? You can requery on an
AfterUpdate event of your combo. As for making the subform visible, you can
set the default visible property to FALSE and use the form's on Open event to
set visible to TRUE.
 
G

Guest

Rick,

For step 1 (what is currently happening) when the form is opened, the user
can select his/her name. However, the subform does not automatically display
the desired data. I have to switch between the design view and form view
before I actually see the desired information on the subform. How can I get
the subform to display the information when the user selects his/her name?

For step 2, how do I get that step to work also?

By the way, I opened the properities dialog box and saw "Link Master Fields"
& "Link Child Fields" but I could not do anything. A warning appeared (via
the office assistant) saying that I couldn't build a link between unbound
forms. How do I handle this error message?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top