I've made an activex control which has a method to search a db table, and shows a modal form (part of the control project) to accept search terms. I need to run a method in the control in response to a button click on the form, but I keep getting "Sub or Function not defined" and execution crashes on the line calling the method.

Code in the form:
------------------------------------------
Private Sub cmdSearch_Click()
Dim x As String
x = DoSearch(keywords)
End Sub
------------------------------------------

Code in the control:
------------------------------------------
Public Function DoSearch(SearchFor as String)
'do the search
End Function
------------------------------------------

Tried it as an event, too--crashed on same line.
Can I not call an event in a control from a form within the control's project? Am I missing something? Please help.

Thanks!