access 2000 forms

  • Thread starter Thread starter trish elder
  • Start date Start date
T

trish elder

could someone please tell me how when i have a datasheet
form and want to go into another form (with more info)
after i double click record in datasheet view how i can
make the same record open in the other form
 
In the DblClick event of your control, use the WhereCondition of the
OpenForm action to open the other form to the same record. This assumes you
have a primary key value available in your form that would uniquely identify
the record.

This sort of thing:

Private Sub MyID_DblClick(Cancel As Integer)
Dim strWhere As String
If Me.Dirty Then
Me.Dirty = False
End If
If Me.NewRecord Then
MsgBox "Select a record to open."
Else
strWhere = "MyID = " & Me.MyID
DoCmd.OpenForm "MyOtherForm", WhereCondition:= strWhere
End If
End Sub
 
Back
Top