473,394 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

FindNext, FindFirst method problem on form, help?

JC
I have a list box loaded with Student Name, Social Security. When the
user click on a specific record, the following code is assigned to the
lstStudent1_AfterUpdate procedure.

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

Set rs = Me.Recordset.Clone
rs.FindFirst "[StudentName] = '" & Me![lstStudent] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

This works great, but not when you have duplicate Student Name and
Social Security records in the table. At this point, the recorset uses
FindFirst and returns the first instance in the record-set. It never
moves to the next one.

How do I get my list box to move to the next record in the table when
you click on the next matching record in the list box?

Thank you to anyone that can assist,

Justin

Oct 16 '06 #1
0 1781

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tom | last post by:
Wta is the code structure to put Rst.FindNext in a loop? I'm using what I show below. It works fine but my instinct says it should be in some standard loop rather than using the GoTo structure. ...
1
by: cnlai | last post by:
Snippets -------- Dim mydb As Database, myset As DAO.Recordset Set mydb = CurrentDb Set myset = mydb.OpenRecordset("abc") myset.FindFirst (" = 'S02'") '<< problem here Reference: MS DAO...
1
by: Shaun | last post by:
Hi all Simple question re .findfirst Is it true it does not use any indexes and really the best option with a SQl backend (ignoring using Stored Procedures which at this stage has not been...
9
by: John Hernry | last post by:
I have been watching the dotnet newsgroups for a couple of weeks now and scouring the net looking for a solution to my datagrid find functionality. With no luck. I am hoping that you can help me....
3
by: wvhines | last post by:
Hello: I am an ambitious novice...I have a main form "frmGeneralContracting" that has a subform on it called "frmsubDeliverables" and I am trying to restrict editing if the current user's login...
1
Corster
by: Corster | last post by:
I went through a great deal of hassle to figure this out for myself, but now it is complete, I would like to share it with the world! I know afew other people have had trouble with FindFirst and...
1
by: shiznaw | last post by:
How can I attach the findnext method to a spinbutton so that the control can browse through the values of a particular field? Private Sub SpinButton4_SpinUp() Dim mjr As Recordset Set mjr =...
3
by: boliches | last post by:
I am trying to get a continuous form to highlight lines individually (ideally on hover). I have used the following code as recommended by a previous entry on this website. My problems begin in that...
0
by: bitstreamer | last post by:
Greetings everybody, I'm trying to UNDERSTAND this code. I've already done lots and lots of debugging sessions and I can confirm that the FIND_NEXT routine is never executed. Every file entry...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.