MS ACCESS CANNOT SELECT RECORD FROM COMBO BOX

I am trying to select record in continuous form with combo box and populating other records with combo box. Its not working I had attached example files. Thanks in advance. Please look at explain.jpg file it will tell you what i am trying to achieve.
MYDATABASE.accdb
Explain.jpg
Roger GillManagerAsked:
Who is Participating?
 
John TsioumprisSoftware & Systems EngineerCommented:
Take a look at my attachment
MYDATABASE.accdb
1
 
hnasrCommented:
This happens because your form fields are unbound.
Make your form fields bound to table fields.
In design mode:
Select Text1 unbound field, and type in = respective field name from table.
Or set it in Property sheet.
0
 
Dale FyeCommented:
if you mean you have a combo box in the form header or footer, as a way to search for a record, then you do NOT want to bind that control to anything.

Instead, use the AfterUpdate event of the control to search for the record and select it, something like:
Private Sub cboSearchName_AfterUpdate

    Dim strCriteria as string
    if me.cboSearchName & "" = "" then Exit Sub

    with me.recordsetclone
        strCriteria = "[LastName] =  '" & me.cboSearchName & "'"
        'strCriteria = "[ID] = " & me.cboSearchName     'use this if the bound column of the combo box is an ID value
        .findfirst strCriteria
        if .nomatch then 
             msgbox "unable to find record 
        Else
            me.bookmark = .bookmark
        End IF
    End With

End Sub

Open in new window

0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
Roger GillManagerAuthor Commented:
Thanks :John Tsioumpris andThanks  , work like charm !
0
 
Roger GillManagerAuthor Commented:
Thanks alot for your time and effort !!
0
 
John TsioumprisSoftware & Systems EngineerCommented:
glad for helping you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.