Clearing information from Subform

T

tmdrake

I have a main form where the user can make a selection from one or a
combination of four comboboxes. The base on the selection the information is
displayed in "datasheetview" on a subform.

On the main form there is a command button "Clear" that clear the selection
made in the comboboxes. This works fine.

Where I need help is when the user clicks the "Clear" button, not only do I
want it to clear the comboboxes on the main form, I also want the subform to
clear until a new selection is made on the mainform.

This is the code I am using to clear the comboboxes on the main form:

Me!ProjectId = Null
Me!DisciplineName = Null
Me!SectionNumber = Null
Me!LastName = Null
Call Select_Click
End Sub

How do I motify this to include clearing the subform?

Help is greatly appreciated, I just can't seem to get it right.
 
S

Stuart McCall

me!subform.datasource = ""

That would need to be:

Me!Subform.Form.RecordSource = ""
 

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