List Box in Contact Details

  • Thread starter Thread starter New to Access '07
  • Start date Start date
N

New to Access '07

I am using Access 2007 and created a list box for my contacts under Contact
Details. When I use the list box to select a different contact, I would like
the screen to switch over that person's information. So far, all I have is
the list box, but I am not being directed to a new details screen for the
next person. Please HELP.
 
I would recommend a combo box instead of a listbox - you can type in the
first few characters of your contact and find it easier. Set your record
source on the form to the table with the contacts.

In the afterupdate event of the combobox (which I call cboFind):

Private Sub cboFind_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ContactID] = " & str(Nz(Me![cboFind], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

End Sub

Damon
 
Back
Top