Results 1 to 1 of 1
  1. #1
    Join Date
    Jun 2006

    Unhappy Unanswered: Help on Access DB 2002: Using VB coding for AfterUpdate on ComboBox

    Issue with VB Coding in COMBO BOX in AFTERUPDATE

    Hello everyone :

    I am having an issue with coding in VB for my Combo box on AfterUpdate in Access 2002. Attached are also pictures and descriptions of the problem in order to visualize the issue that I am currently going through. Please check the attachment given.

    Here is the current condition:

    I have a database setup that has record information of physicians, ranging from their address to phone numbers. I have already setup a form in order to be use to retrieve information of physicians [exhibit A in attachment document].

    I have also already setup the Row source Code for retrieving the physicians names in Combo box by using the following code:

    SELECT tblPhysician.physicianName FROM tblPhysician ORDER BY tblPhysician.physicianName;

    Now the issue comes in where I implement the following code to After Update Event Procedure in Database Module [ Please see the images attached ]

    Option Compare Database
    Option Explicit

    Private Sub cbophysicianname_AfterUpdate()

    Dim vName As String

    vName = cbophysicianname

    If Not vName = Empty Then
    DoCmd.FindRecord vName, acEntire, False, , False, , True
    End If

    End Sub

    After the code is set and I select the physicians on the form table that I want to retrieve the information [ Please refer to attached doc to view image Exhibit A ]., an Error occurs in

    "DoCmd.FindRecord vName, acEntire, False, , False, , True"

    I tried to find ways to solve this issue but having no luck at luck .

    Can anyone please help me on this issue?

    Your help is gladly appreciated.

    Attached Thumbnails Attached Thumbnails exbihit A.gif   exbihit B.gif   exbihit C.gif   exbihit D.gif  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts