Default Value in From

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
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?
 
lreecher said:
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?

What code are you running when a selection is made in the ComboBox?
 

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

Back
Top