I need to close a child form when a button is clicked on another child form.

I'm using:

pcms.frmDataEntry1.Close() - on the click event but get an error


Object reference not set to an instance of an object.