Solved

Access Combo box

Posted on 1998-10-02
2
165 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

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…
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 …
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

756 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