Subform control

A

adl113060

I have a checkbox on a main form that I need to controll the results
displayed in the subform.

The subform is already populated by the parent/child relationship but I need
to also filter that information based on the checkbox.
 
B

banem2

I have a checkbox on a main form that I need to controll the results
displayed in the subform.

The subform is already populated by the parent/child relationship but I need
to also filter that information based on the checkbox.

Create an SQL source for subform like:

SELECT * FROM tblTableName

When you click check-box use AfterUpdate event and execute:

sfrmSubFormName.Form.RecordSource = & _
"SELECT * FROM tblTableName WHERE fldFieldName = " & chkCheckBox

If needed requery form after above command.

Regards,
Branislav Mihaljev
Microsoft Access MVP
 

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