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.

fuck men! your english is too deep, i cannot swim.......

i can not understand your question. can you give me more explanation?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.