Setting a table control object returns "object not set"

I have a macro that is supposed to be enabling a subform grid. For some reason, I keep getting a runtime error. My approach to this is essentially copied from another macro that is working.

	With thisComponent.DrawPage.forms
		oSearchForm = .getByName("SearchForm")
		oMainForm = .getByName("MainForm")
		oSubFom = .getByName("MainForm").getByName("SubForm")
	End With
	With thisComponent.currentController
		oSearchFormController = .getFormController(oSearchForm)
		oMainFormController = .getFormController(oMainForm)
		oSubFormController = .getFormController(oSubForm)
	End With
	oSearchControl = oSearchForm.getByName("GoTo")
	oEntByControl = oMainForm.getByName("EnteredBy")
	oRevByControl = oMainForm.getByName("ReviewedBy")
	oTableControl = oSubForm.getByName("SubForm_Grid")

All variables have been initialized. It throws:

BASIC runtime error.
Object variable not set.

for the line starting with "oTableControl = "

In my form document “MainForm” has a form “SubForm” that has a “SubForm_Grid” that is a table control.
I’m not sure how to determine what object is not set, or what is causing the error. Could someone please point me in the right direction?

Hello,
Spelling error:

oSubFom = .getByName("MainForm").getByName("SubForm")

Should be:

oSubForm = .getByName("MainForm").getByName("SubForm")

D’oh! Thanks!