The following code will open up your main form to the record you click on the search form, and disable certain buttons.
Private Sub searchresults_Click()
On Error GoTo Err_searchresults_Click
Dim frmMyForm As Form
Dim ctlMyCtls As Control
Set frmMyForm = Forms!MainForm
Dim stDocName As String
Dim rst As Recordset, strCriteria As String
stDocName = "MainForm"
strCriteria = "[criteria]=" & "'" & Me![searchresults] & "'"
DoCmd.OpenForm stDocName
Set rst = Forms!MainForm.RecordsetClone
rst.FindFirst strCriteria
Forms!MainForm.Bookmark = rst.Bookmark
Me!searchresults = ""
For Each ctlMyCtls In frmMyForm.Controls
If ctlMyCtls.Tag = "disable" Then
ctlMyCtls.Visible = True
ctlMyCtls.Enabled = False
ctlMyCtls.Locked = True
Exit_searchresults_Click:
Exit Sub
Err_searchresults_Click:
MsgBox Err.Description
Resume Exit_searchresults_Click
End Sub
searchresults = name of txt box where results are displayed in
Mainform = name of your Mainform
criteria = criteria by which you have done your search/navigate records
For all the buttons you wish to disable, put disable in the tag property
Give it a go, and report any problems you have
HTH
Angelo
[This message has been edited by Angello Pimental (edited 07-12-2001).]