| | |
How to compare 2 string from different table using vb6 badly need help
![]() |
•
•
Join Date: Jan 2008
Posts: 18
Reputation:
Solved Threads: 0
Private Sub Command1_Click()
Set rs1 = DB.OpenRecordset("Table1", dbOpenDynaset)
If rs1.EOF = True Then
MsgBox "Record is Empty"
Else
MsgBox "Got IT"
rs1.MoveLast
If Not rs1.EOF Then rs1.MoveFirst
Do While Not rs1.EOF
If rs1!Name <> "" And rs1!age <> "" Then
Set rs2 = DB.OpenRecordset("SELECT Name FROM Table2 WHERE Name like '" & rs1!Name & "*' ;")
If rs2.EOF = False Then
List1.AddItem (rs2!Name)
End If
End If
rs1.MoveNext
Loop
End If
If i will run this code with the given david godz c from table1 and david godz cagayan from table 2 it will display a david godz cagayan in the list
but my problem is how am i suppose to output same david godz cagayan in the list if i where
give a david godz c. from table1 and david godz cagayan from table2.
by the way im using ms access.
Set rs1 = DB.OpenRecordset("Table1", dbOpenDynaset)
If rs1.EOF = True Then
MsgBox "Record is Empty"
Else
MsgBox "Got IT"
rs1.MoveLast
If Not rs1.EOF Then rs1.MoveFirst
Do While Not rs1.EOF
If rs1!Name <> "" And rs1!age <> "" Then
Set rs2 = DB.OpenRecordset("SELECT Name FROM Table2 WHERE Name like '" & rs1!Name & "*' ;")
If rs2.EOF = False Then
List1.AddItem (rs2!Name)
End If
End If
rs1.MoveNext
Loop
End If
If i will run this code with the given david godz c from table1 and david godz cagayan from table 2 it will display a david godz cagayan in the list
but my problem is how am i suppose to output same david godz cagayan in the list if i where
give a david godz c. from table1 and david godz cagayan from table2.
by the way im using ms access.
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: text box should be replaced by rich text box
- Next Thread: failed to connect my database
| Thread Tools | Search this Thread |
* 6 2007 access activex add age basic beginner birth bmp calculator cd cells.find click client code college connection connectionproblemusingvb6usingoledb creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit excel excelmacro file filename form header iamthwee image inboxinvb internetfiledownload listbox listview liveperson login looping microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading remotesqlserverdatabase report save search sendbyte sites sql sql2008 sqlserver subroutine tags time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web windows





