Default Value in From

L

lreecher

When a form opens, I would like the fields to show no values until a value is
selected in a combo box. This should not be hard but I haven't found any good
info on how to do this. Thanks.
 
R

Rick Brandt

lreecher said:
When a form opens, I would like the fields to show no values until a
value is selected in a combo box. This should not be hard but I
haven't found any good info on how to do this. Thanks.

What are you going to do when they make a selection in the ComboBox? You
could either use the bookmark method to *navigate* to the desired record or
use the selection to apply a *filter* to show the dsesired record(s).

If using the latter then just open the form initially with an impossible
filter...

DoCmd.OpenForm "FormName",,,"1= 0"

That will display a blank form. When you aplly a new filter after the user
makes a selection then you will be replacing the "1 = 0" filter with a
different one.

If you want to use the navigation method then you might have to do the same
when opening the form, but have your navigation code clear the filter before
doing the search.
 
L

lreecher

I was able to get part of what I want to work with your help. No values show
when the form opens. Yeah! However, when I select a value in the combo box
the related data does not fill in the fields. Where have I gone wrong?
 
Top