ComboBox / SubForm Question

J

Joe Williams

I have a main form /subform set up. On the main form, there is a combo box
that restricts the records in the subform the the value that is chosen on
the combobox.
Works great.

The problem I am having is that when the form initially opens, all of the
records from the subform table are displayed until a value is chosen in the
combo box.

How can have the subform by default display no records when the form opens,
at least until a combo box value is chosen?

Thanks

Joe
 
S

Samantha Rawson via AccessMonster.com

Have:

Private Sub Form_Load()
subformname.visible = false
End sub
_______
Private SUb Comboboxname_After_Update()
subformname.visible = true
End sub

Dunno if this will work, might be .hidden for subforms. To set the code, go into the properties of:
.. form for on form load command and click the 3... where it says OnLoad, then fill in code
.. combobox for combobox after update command and click 3... where it says AfterUpdate then fill in code

Samantha Rawson
 

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