From: love on

"esee" <iamnubw(a)gmail.com> wrote in message
news:102a428d-a31c-4be1-95c4-db6e85d1879c(a)f15g2000yqe.googlegroups.com...
> The AfterUpdate Event for a control cboName is NOT updating another
> control txtCurTotals on the same form.
> What's wrong?
>
> The control txtCurTotals has the following Control Source:
> ="Current Selections = " & [TotalCount]
>
> TotalCount: DCount("Ingredient","zIngredientAndLocation","[NeedIt] =
> True")
>
> Private Sub cboName_AfterUpdate()
> Dim rs As DAO.Recordset
> Set rs = Me.Recordset.Clone
> rs.FindFirst "[IngredientID] = " & Me![cboName]
> If rs.NoMatch Then
> MsgBox "Record not found"
> Else
> Me.Bookmark = rs.Bookmark
> Me.NeedIt.Value = True
> Me.Refresh
> End If
> rs.Close
> Set rs = Nothing
> End Sub