Function Find(vTable As String, vField As String, vSearch As Long)
Dim db As Database
Dim rs As DAO.Recordset
Dim strCriteria As String
Set db = CurrentDb()
Set rs = db.OpenRecordset(vTable, dbOpenDynaset)
' This function will allow to search diferent fields...
strCriteria = vSearch
If rs.EOF And rs.BOF Then
MsgBox "Table " & vTable & " is empty...", vbOKOnly, "Error"
End If
rs.MoveFirst
rs.FindFirst "[" & vField & "] = " & strCriteria & ""
If rs.NoMatch Then
MsgBox "Did not find " & vSearch & " in table " & vTable, vbOKOnly, "Error"
Else
Find = rs(1)
End If
End Function
' On other form
Private Sub cmdFind_Click()
Dim vSearch As Long
Dim vTable As String
Dim vField As String
Dim vSearchResult As String
' On other form
vField = "NoGroup"
vTable = "tblGroup"
vSearch = 1
vSearchResult = Find(vTable, vField, vSearch)
MsgBox "Found " & vSearchResult & " in table...

" & vTable, vbOKOnly, "Success"
' now you can keep re-assigning the variables and recalling this function or use arrays, I don't have the time to build that for you.. ;p
End Sub
I will answer any questions about this code though...
Regards,
Brian