For a subform's recordset on a form the syntax would be:
Me.SubFormControlName.Form.RecordSource = vbNullString
SubFormControlName is the name of the subform control on your form, not the
name of the form specified in the subform control's Source Object property.
(vbNullString is the same as "" - You actually get better performance using
intrinsic constants than you do literals.)
That would mean, then that you would have to assign the rowsource in the
After Update event of B.
One other thing. Don't use the Change event. It means literally what is
says, so the Change event fires on every keystroke. Use the After Update
event instead.

Signature
Dave Hargis, Microsoft Access MVP
> I have a form with a combo box (A), a list box (B) and a datasheet view sub
> form (C).
[quoted text clipped - 23 lines]
>
>
djf - 03 Mar 2008 17:01 GMT
Thanks for the input. The code does work to set the form back to no records.
There is one glitch however. It leaves #Name? in every field instead of
displaying blank fields like it does when I open the form. It also messes up
the function of menu B. Once the subform goes to null with the #Name? in each
field, it will not populate with new values when I make a choice in menu B.
It stays stuck with the #Name? values. Without the new code it works
correctly.
I'll keep playing with it, but so far I can't get it to work quite right.
I'm sure it's operator error, but any insights would be greatly appreciated.
> For a subform's recordset on a form the syntax would be:
>
[quoted text clipped - 40 lines]
> >
> >