Solved

Access Combo box

Posted on 1998-10-02
2
162 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
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: …

920 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now