this is the grid click event on form1
Private Sub Grid_Click()
strID = Grid.TextMatrix(Grid.RowSel, 1)
End Sub
when the user clicks on edit button it opens form2, which opens the record based on the strID and fills the text boxes
this is the form_load event of form2
Set objConn = New ADODB.Connection
Set objComm = New ADODB.Command
Set objRec = New ADODB.Recordset
objConn.ConnectionString = "DSN=*;UID=*;SERVER=*;PWD=*"
objConn.Open
objComm.ActiveConnection = objConn
objComm.CommandText = "Select * from table where id = '" & strID & "'"
objComm.CommandType = adCmdText
Set objRec.Source = objComm
objRec.Open
If objRec.EOF Or objRec.BOF Then
MsgBox ("EOF/BOF"

Else
load info into text boxes
End If
objRec.Close
objConn.Close
this works just fine for the first time i open a record, but if i close form2 and open form1 and select another user and click on edit when form2 opens it has all the info from the first time i opened it. Even though the strID changed.
thanks for the help