Folks,
This driving me mad, any help would be appreciated.
I have a form that is unlinked to any tables or queries. It houses 2 subforms, each of which is based on a query. On load, each sub form checks to see if any records are returned by the query. If not, it will instead display another form in the subform showing the text "No Data"
The code for this is as follows (placed in the onload event of each subform):
So far this all works fine. The problem arises whn the close button is clicked on the master form. A general protection fault is produced.
The error only occurs if one or both of the subforms has swapped to the 'No Data' form.
Non of the forms (master, sub or otherwise) have any code that runs on close, unLoad etc.)
All I want to do is close the master form .... HELP
Thanks in advance,
Graeme
website:
This driving me mad, any help would be appreciated.
I have a form that is unlinked to any tables or queries. It houses 2 subforms, each of which is based on a query. On load, each sub form checks to see if any records are returned by the query. If not, it will instead display another form in the subform showing the text "No Data"
The code for this is as follows (placed in the onload event of each subform):
Code:
if me.recordsetClone.recordCount <1 then
forms!frmParentForm!subFormA.SourceObject = frmNoData
end if
So far this all works fine. The problem arises whn the close button is clicked on the master form. A general protection fault is produced.
The error only occurs if one or both of the subforms has swapped to the 'No Data' form.
Non of the forms (master, sub or otherwise) have any code that runs on close, unLoad etc.)
All I want to do is close the master form .... HELP
Thanks in advance,
Graeme
website: