Change subform to another if no filter match found

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

Hi All,

I have form with fields that filter a subform.

the subform updates to the record automatically. Great. But, if there is
no record match for that filter, it shows a blank space.

How can I get the subform to show a "No Record Found For This Student"
form instead?

Any ideas greatly appreciated,

Jeff
 
I would think you can check for the existence of records on the subform,
perhaps in the subform's OnCurrent event. If you can't use the subform
event, you could probably use the events on the main form's controls that are
controlling the subform - or a common subroutine they all use.

Once you determine if a record(s) present, you can toggle the Visible
property of a label that says, "No records found..." The label will probably
need to go into the subform's header section.

Or, you could place an always visible label behind the subform, and toggle
the visibility of the subform.

Hope this helps.
 
Back
Top