is there any possibilities that you can make a vb6 code, that can search backwards from last to first?
first, i just want to apologize for disturbing you..x)
i mean, from an access 03 database
i inputed in the fieldname: studentnumber
then, i entered below, five(5) records of studentnumber(fieldname) with same value 00001..( this was inputed in access 03 database, not in a vb6 project to lessen the time)
so there are five(5) of same studentnumber, w/c is 00001?
so, here is the thing, a vb6 code using (textbox1_change) must search backwards start from the fifth(5th) record 00001 to the first record...
(the searched studentnumber must shown also in a textbox2)
with a moveprevious and movenext commandbuttons...(to determine if it starts from last to first string)
if you know this one, can i do a favor? to make an example and post it here.
cause i just also want to know it...
remember: sharing is good... for like me who wants to know the possibilities.
hope you help me, that's if your not busy...
thanks in advance...GOD bless...
all answers is much more appreciated... again thanks for sharing...
use an ORDER BY statement in your select query.
Good Luck
4 1319
use an ORDER BY statement in your select query.
Good Luck
i'd tried that one..
studentnumber(fieldname)
example: studentnumber(fieldname) had 10 same recorded number 00001..
how it will goto the last record or the 10th record directly?
coded like this:
query (select * from tb1 order by studentnumber)
but the problem is, it always starts at the first record? not on the 10th record
will you help me on how to find the last record only..
you may EDIT this code..
thanks again for sharing..and thanks in advance for EDITING...
Okay, to move to the last record then you can use...
Then to move from the last to the first... -
Do While Not Rs.BOF
-
'do whatever
-
Rs.MovePrevious
-
Loop
-
Good Luck
here is the code im working with?
it is a dataenvironment, im sure you knew this code?
it is same like ADODC OR A MODULE code?
if you dont know, please forward this to your experts friend who knew how to twick or trace the error..
this code only search the first record... you had been search.. - Private Sub old_Change() ' this is a textbox,
-
-
'that searches only the first entered studentnumber 00001, but they're lots of
-
'inputed like 00002.. so on and so fort, but i inputed (3) three 00001. '
-
'cause i want this search code must find the last record 00001, not the last "anynumber" in a database.
-
' ONLY the Search number entered in the "old.text" w/c i search "00001" must seek not the 00002 or the last record inputed in the database...
-
-
'meaning... (3)00001,(1)00002,(1)00003
-
-
'if i code rs.movelast only IM SURE IT GOTO THE LAST RECORD WHICH WAS 00003..
-
'but i want to only the last record of 00001, because it is a search command.
-
-
'hope you will help me to fix this code...
-
-
'thanks...x)
-
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
On Error Resume Next
-
-
Dim findstr As String
-
-
If Not DataEnvironment1.rsTranSub.Supports(adFind) Then
-
MsgBox " Doesn't support Recordset "
-
-
Else
-
If DataEnvironment1.rsTranSub.Supports(adBookmark) Then
-
lastrow = DataEnvironment1.rsTranSub.Bookmark
-
-
End If
-
-
findstr = old.Text
-
If findstr = "" Then Exit Sub
-
-
-
-
'DataEnvironment1.rsTranSub.Movelast
-
- ' I think here is the code i can't fixed below:
-
-
DataEnvironment1.rsTranSub.find "studentnumber LIKE '*" & findstr & "*'"
-
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
If DataEnvironment1.rsTranSub.EOF Then
-
MsgBox "No records found!" & findstr
-
-
If DataEnvironment1.rsTranSub.Supports(adBookmark) Then
-
DataEnvironment1.rsTranSub.Bookmark = lastrow
-
-
End If
-
End If
-
End If
-
-
End Sub
Sign in to post your reply or Sign up for a free account.
Similar topics
by: NJ |
last post by:
MAKE MONEY FAST AND EASY HURRY!!!! Make Money Fast A little while back, I was browsing these newsgroups, just like you are now, and came across an article similar to this that said you could make...
|
by: Alan Silver |
last post by:
Hello,
This is NOT a troll, it's a genuine question. Please read right
through to see why.
I have been using Vusual Basic and Classic ASP for some years, and
have now started looking at...
|
by: Urs Eichmann |
last post by:
regarding partial classes and form designer
http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?FeedbackId=a2e101a4-67ed-4478-a072-6fa1986b751b
Thanks,
Urs
|
by: childofthehorn |
last post by:
Okay, so I can get this to read the first line of a txt document. I just can't figure out how to get it to read the next lines. I have to use "user_input" in a function. The wait function just waits...
|
by: pagoto123 |
last post by:
hello.. i need to read picture or notepad from access database ..
i make the access column a ole object i put the photo but when i photo.text = myreader(1) then it says conversion from byte to...
|
by: AdrianH |
last post by:
Before posting in this forum please read the Posting Guidelines available in the site Help.
If you are a student or if you are answering a students questions then please pay special attention to...
|
by: Winpygsfli |
last post by:
I have an application that has an iFrame wich houses a form. I need to read the value of a specific input field from the iFrame.
iFrame - portalArea
Form - frmUserProfile
Input field -...
|
by: rohanit46 |
last post by:
i need to read xml content from a web service onto a local machine and parse the data using javascript.
While using XMLHttpRequest, it allows me to access xml content from anywhere on local...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
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...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
| | |