Click table Record to open form

  • Thread starter Thread starter Bob B.
  • Start date Start date
B

Bob B.

Hi!

Is it possible in access wherein you would click a certain record in a table
and it would open a form with the details of the record.... I've seen this
in some applications...

Thanks.
 
Bob,
Below is some code I copied out of one of my forms
where selected record fields from a query are displayed.
When the user double-clicks in the record selector area
that lays alongside the continuous forms detail section,
I switch to a form that has all the detail relating to that
record.

Not exactly what Ken suggested, but close to it.

Bill

Private Sub Form_DblClick(Cancel As Integer)
'===================================================================
'User has double-clicked upon the record selector adjacent to either
'a family name or a new "blank" table entry at the bottom of the
'table form.
'===================================================================

Dim frm As String
frm = "Family Details" 'Set the name for
Family details

If IsNull(Me.[FamilyName]) Then
DoCmd.OpenForm frm, , , , acAdd, , "NewEntry" 'Add a new family
Else
DoCmd.OpenForm frm, , , , acFormEdit, , Me.[FamilyID] 'Display
current family details
End If
End Sub
 
The code I use to do that is:


docmd.openform "the form",,,"id = " & me.id

The above assuming your data is a being viewed in a continues form.

The above code could go in the double click event of one of text boxes (the
first one).

You can also place a button in the continues form, and again the above code
will work well.

if you take a look at the following screen shot, the above code is used
behind the button that repeats in the continues form.

check out:

http://www.attcanada.net/~kallal.msn/Search/index.html
 
Back
Top