0
votes

I want to be able to update a table from a form, but after i have selected the record to update by using a combination of combo boxes.

The table that contains the record I want to update is called 'tblNames' and contains multiple columns such as 'ChildID', 'FirstName', 'LastName', 'FullName', 'ClassID' and 'ClassName'

The first combo box filter is called 'cboClass' and its row source is a table called 'tblClass'. This lists all the available classes. This has an after_update event which re-queries my second combo box filter called 'cboName'.

This then allows the user to select a name of a child in that class. So far this works...

I now need to display the record in 'tblNames' that is equal to the name selected in 'cboName' but i dont know how to do this. Is it through text boxes that have a control source of tblNames?

Can anybody help?

1

1 Answers

0
votes

So you can build a query using combo boxes and just adding an and with each selection. Here's an example:

If ComboName.ListIndex <> -1 Then

    queryFrame = queryFrame & " and Analyst = '" & Me.cmbAddToQuery.Value & "'"
    Call queryBuilder

End If

You're queryFrame should look like this

queryFrame = "Select * from tblNames where LogID is not null"

If I had actual code I could help you more. This is just a small example.