Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List Box "Blank Spaces" ?

Status
Not open for further replies.

number2

Technical User
Oct 25, 2001
284
US
I have a list box which lists records (last name and first name)

There is an occaisional bug in the control resulting in "blank" spaces in the lest box. These "blanks" are actually duplicates of another record. If the user deletes the blank in the list box, they actuallt delete the duplicated record.

Here is the cose used on the After Update :
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[number] = " & Str(Nz(Me![List618], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
 
Not sure if you noticed, but you only posted a fraction of the code in that routine.

Post back with the rest and we'll be able to see what's going on.

Jeremy =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developer's section of the site for some helpful fundamentals.


Remember to reward helpful tips with the stars they deserve.
 
That is all the code I have other that the pre and sub; thanks for checking it out.

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

Set rs = Me.Recordset.Clone
rs.FindFirst "[number] = " & Str(Nz(Me![List618], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top