How to add a combo box on a form so it controls the other data on the form?

Posted on 2014-08-25
Last Modified: 2014-09-02
The images attached (Form-1 and Form-2)give an explanation of the problem and what I am trying to accomplish.
The Incident Title on the “Condition” form is a working example of what I am trying to accomplish on the Causal form.
Question by:cssc1
    LVL 84
    So you want to be able to select an Incident Title and have all the related information for that Incident displayed on the form?

    If so, it looks like you could just find the related Event record, and set the Form's Bookmark to that, which should then show all the related records in the subforms. To do that:

    Dim rst As DAO.Recordset
    Set rst = Me.RecordsetClone

    rst.FindFirst "Incident_ID=" & Me.YourIncidentTitleCombo.Column(0)
    If Not rst.NoMatch Then
      Me.Bookmark = rst.Bookmark
      Msgbox "Incident not found"
    End If

    You'd add that in the AfterUpdate event of the Incident combo. I'd suspect the RowSource of the Incident combo would be the same as the Incident combo on the Conditions_1of3_frm.

    Author Comment

    yes, that is exactly what I am trying to do.

    I added your code to the afterupdate and now I am getting an error and nothing is in the combo box.

    I don't know what to do at this point.

    Please see attached images and db
    LVL 84
    Is Incident_ID a Text value, or a Numeric value?

    If it's Text:

    rst.FindFirst "Incident_ID='" & Me.Combo26.Column(0) & "'"

    Also, what's the RowSource for Combo26?

    Author Comment

    Incident_ID is a Numeric value.

    I think the Row Source is the table "1-Incident-tbl" and the field to populate the Combo 26 is "INCIDENT TITLE:".

    I hope this helps, thank you
    LVL 84

    Accepted Solution

    I think the Row Source is the table "1-Incident-tbl"
    Open the form in Design view and post the RowSource of the query here.

    Author Comment

    more errors.

    I am not sure I am doing this part correctly "and post the RowSource of the query here".

    Also, what query di I post and where is it posted?

    see attached image

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    In the previous article, Using a Critera Form to Filter Records (, the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
    I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
    Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
    With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

    779 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

    18 Experts available now in Live!

    Get 1:1 Help Now