Combo Unique Selection-Query Builder

J

Jody

Hi,

I have a combo box whose row source is determined via the
SQL Statement:Query Builder. The purpose of the combo is
to allow a search, and not store data in a field. When a
value is selected, the entire record of which the value is
a part, is shown in a form.

The Query taps into a field called Subsnumber (text data
type) in a table called tblSubscriber. Some of the
Subsnumber data is identical, but each is part of a
distinct record.

The problem is that when I select any of these identical
data values, the same record shows in the form, rather
than the correct record. Here is the code that likely
controls this (which was created by a Wizard):

Private Sub Combo78_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ProspSubscrID] = " & Str(Nz(Me!
[Combo78], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Does anyone know how to correct the code, so that the
proper record is shown for each identical data value?

Cheers,
Jody
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top