Solved

Access Combo box

Posted on 1998-10-02
2
161 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
Comment Utility
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
Comment Utility
I wish there was an easier solution.  
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

My experience with Windows 10 over a one year period and suggestions for smooth operation
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
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: …

772 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

16 Experts available now in Live!

Get 1:1 Help Now