Combo Box Pulldown not refreshing

G

Guest

When I select a name from my unbound combo box the main form does display the
appropriate information. When I select another name, it also updates the
main form.

THE ISSUE: If I have two or more people with the same last name (for
example), and I select one..then another...the main form does NOT update with
the second person. Example...I select Smith, the record shows up....I then
select the second Smith in the pulldown and the main form does not update to
the second Smiths information.

What am I missing here?

Thanks...b
 
G

Guest

If you are not doing something like this, then that is the problem:

Private Sub cboLastName_AfterUpdate()
Dim rst As Recordset
'Find the Last Name Selected
Set rst = Me.RecordsetClone
rst.FindFirst "[LAST_NAME] = '" & Me.cboLastName & "'"
Me.Bookmark = rst.Bookmark
rst.Close
Set rst = Nothing
End Sub
 
G

Guest

Instead of searching by the Name, search by the ID if you have one, you can
set the row source of the combo to include the ID, and the name
Select ID , Name From TableName

And you don't have to display the ID, by setting the column width. but the
search will be by the ID which is a unique value
 
G

Guest

I would set a Contact ID and place at minimum the Contact ID and the Name in
a COMBO box. This allows a users to select visually the correct record when
there is more than one name that is identical or close to identical and yet
the roll out for the record uses the Contact ID and displays the right
record. The basic combo box process I believe goes to the first record with
that last name or what ever and works great if there is only one record with
that criteria.
 
G

Guest

OK...I modifed as follows (I know it is something easy and I appreciate your
assistance). I'm gettng a runtime error 91 on the Me.Bookmark = rst.Bookmark
line.

Private Sub Combo73_AfterUpdate()
Dim rst As Recordset
Set rst = Me.RecordsetClone
rst.FindFirst "[LastName] = '" & Me.Combo73 & "'"
' Me.RecordsetClone.FindFirst "[LastName] = '" & Me![Combo73] & "'"
Me.Bookmark = rst.Bookmark
rst.Close
Set rst = Nothing
Me.Bookmark = rst.Bookmark
rst.Close
Set rst = Nothing
End Sub



Klatuu said:
If you are not doing something like this, then that is the problem:

Private Sub cboLastName_AfterUpdate()
Dim rst As Recordset
'Find the Last Name Selected
Set rst = Me.RecordsetClone
rst.FindFirst "[LAST_NAME] = '" & Me.cboLastName & "'"
Me.Bookmark = rst.Bookmark
rst.Close
Set rst = Nothing
End Sub


bmoses said:
When I select a name from my unbound combo box the main form does display the
appropriate information. When I select another name, it also updates the
main form.

THE ISSUE: If I have two or more people with the same last name (for
example), and I select one..then another...the main form does NOT update with
the second person. Example...I select Smith, the record shows up....I then
select the second Smith in the pulldown and the main form does not update to
the second Smiths information.

What am I missing here?

Thanks...b
 
G

Guest

Oops. I deleted the duplication but the records are still not changing when
I select another "Smith" from the drop down.

Klatuu said:
If you are not doing something like this, then that is the problem:

Private Sub cboLastName_AfterUpdate()
Dim rst As Recordset
'Find the Last Name Selected
Set rst = Me.RecordsetClone
rst.FindFirst "[LAST_NAME] = '" & Me.cboLastName & "'"
Me.Bookmark = rst.Bookmark
rst.Close
Set rst = Nothing
End Sub


bmoses said:
When I select a name from my unbound combo box the main form does display the
appropriate information. When I select another name, it also updates the
main form.

THE ISSUE: If I have two or more people with the same last name (for
example), and I select one..then another...the main form does NOT update with
the second person. Example...I select Smith, the record shows up....I then
select the second Smith in the pulldown and the main form does not update to
the second Smiths information.

What am I missing here?

Thanks...b
 
B

Barry Moses

This is still not allowing me to select another individual with the same
lastname and updating the main part of the form. If I select someone with a
different name it displays.

Thoughts?

bmoses said:
Oops. I deleted the duplication but the records are still not changing
when
I select another "Smith" from the drop down.

Klatuu said:
If you are not doing something like this, then that is the problem:

Private Sub cboLastName_AfterUpdate()
Dim rst As Recordset
'Find the Last Name Selected
Set rst = Me.RecordsetClone
rst.FindFirst "[LAST_NAME] = '" & Me.cboLastName & "'"
Me.Bookmark = rst.Bookmark
rst.Close
Set rst = Nothing
End Sub


bmoses said:
When I select a name from my unbound combo box the main form does
display the
appropriate information. When I select another name, it also updates
the
main form.

THE ISSUE: If I have two or more people with the same last name (for
example), and I select one..then another...the main form does NOT
update with
the second person. Example...I select Smith, the record shows up....I
then
select the second Smith in the pulldown and the main form does not
update to
the second Smiths information.

What am I missing here?

Thanks...b
 

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