Blanking Subform for no Data

G

Guest

A pull down list from a combo box on a main form controls the data displayed
in a subform. So, why when there is no data corresponding to the item
selected, does the subform not blank. How can I get it to blank when there
is no corresponding data to the pull down box selection?

Thanx, paul
 
M

MacDermott

How does the combobox control the subform?
Are you using the LinkMasterFields and LinkChildFields properties of the
subform control?
Or are you using VBA? If this latter, please post the code.

Also -
what do you mean by "blank"?
Do you want the entire subform control to be blank?
Or do you want to show the subform with a new (empty) record available
for data entry?

And since you say you're not getting the effect you want, what IS the effect
you're getting?
 
G

Guest

Thank you for coaching me on the specifics. I don’t yet understand what is
important information and what is not.

I am using a Master-Child link. (Shouldn’t it be “master – slave†or
“parent – child?†Aren’t these mixing metaphors?) The effect I want is to
show either a blank space where the “Child†information should be or a new
empty record. Blank seems to make more sense, as this form is not made for
inputting new information.

The master is an unbound combo box. It’s content comes from an independent
query from a table of names. The child is from a different query that is
keyed on the same set of names.

Currently, if there is no relevant data in the child query, the form does
not update but instead, retains the data from the last master-name that did
have corresponding data. Somehow, the sub-form should show that there is no
child-data corresponding to the master-data.

I hope this explains the issue. I thank you for your patience and
instruction. Some say that learning a subject is to learn its history. That
is half right. The other half is learning its language.

Thanx, paul
 
M

MacDermott

I haven't been able to reproduce the condition you describe in my test
database.
However, I'd suggest you try opening the subform in design view and setting
its AllowAdditions property to No. (You might also want to set its
AllowEdits property to No.)
See if that helps.

Here's another tip: when posting, it's a good idea to mention what version
of Access you are using.
 

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