Yep, and it is likely that the form references you used are no longer valid because subforms have a different way of being referenced. So, let's dig in. What code do you have right now, if any to do the search? Are you using a query with a reference to the form?
thanks for the prompt reply.
below is the code i have been using on the form when it is by itself before i drag it into the other form:
Private Sub cmdSearch_Click()
Dim strRef As String
Dim strSearch As String
'Check txtSearch for Null value or Nill Entry first.
If IsNull(Me![txtSearch]) Or (Me![txtSearch]) = "" Then
Exit Sub
End If
'---------------------------------------------------------------
'Performs the search using value entered into txtSearch
'and evaluates this against values in ID
DoCmd.ShowAllRecords
DoCmd.GoToControl ("strID")
DoCmd.FindRecord Me!txtSearch
strID.SetFocus
strRef = strID.Text
txtSearch.SetFocus
strSearch = txtSearch.Text
'If matching record found sets focus in ID and shows msgbox
'and clears search control
If strRef = strSearch Then
'If value not found sets focus back to txtSearch and shows msgbox
Else
MsgBox "Match Not Found For: " & strSearch & " - Please Try Again.", _
, "Invalid Search Criterion!"
txtSearch.SetFocus
End If
Me.Dirty = False
End Sub
now, when i bring this form into the new form as a sub, the "DoCmd.GoToControl ("strID") comes back as cannot be found.