A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

List Box in Contact Details



 
 
Thread Tools Display Modes
  #1  
Old December 15th, 2008, 07:04 PM posted to microsoft.public.access.gettingstarted
New to Access '07
external usenet poster
 
Posts: 1
Default List Box in Contact Details

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.
  #2  
Old December 15th, 2008, 10:10 PM posted to microsoft.public.access.gettingstarted
Damon Heron[_2_]
external usenet poster
 
Posts: 237
Default List Box in Contact Details

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


"New to Access '07" New to Access wrote in
message ...
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.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.