Solved

Access Combo box

Posted on 1998-10-02
2
163 Views
Last Modified: 2010-04-08
I need to be able enter a phone number and have Access find the record and fill in the name and address info.  I would like to use a combo box.  
0
Comment
Question by:teincnj
2 Comments
 
LVL 10

Accepted Solution

by:
MasseyM earned 150 total points
ID: 1621765
Private Sub cmbNameFind_AfterUpdate()
    On Error GoTo cmbNameFind_AfterUpdate_Err

    '   Purpose:    To change the current record displayed
    '   Called By:  cboFind_AfterUpdate
    '   Updated:    98/02/19 by PLD

    Dim rstParticipants As Recordset
    Dim strCriteria  As String
    Dim strBookmark  As String
   
    Set rstParticipants = Forms![frmStudentInfoMain].RecordsetClone
    strCriteria = "ParticipantID = " & cmbNameFind.Column(0)
    rstParticipants.FindFirst strCriteria
    ' cmbNameFind is the combo box that lists the phone number
    If Not rstParticipants.NoMatch Then 'If it matches
        strBookmark = rstParticipants.Bookmark
        Me.Bookmark = strBookmark
        cmbNameFind = Null
    End If

cmbNameFind_AfterUpdate_Exit:

    Exit Sub

cmbNameFind_AfterUpdate_Err:
    MsgBox "Error locating Participant: " & CStr(cmbNameFind.Column(1))
    GoTo cmbNameFind_AfterUpdate_Exit

End Sub

0
 

Author Comment

by:teincnj
ID: 1621766
I wish there was an easier solution.  
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

823 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question