Ok, I have to use SQL to have a database search two different tables within it.

I know how (somewhat) how the code is suuposed to work, but I'm not sure of the exact worind. Could anyone help me out with this. Here's what I have so far.

Private Sub cmdSearch1_Click()
Dim SDN As Database
Dim sqlStr As String
frmMain.datAcct.Recordset.MoveFirst
Do Until frmMain.datAcct.Recordset.EOF
For i = 2 To 100
sqlStr = "select * from SDN where ListInfo like '*"
sqlStr = sqlStr + accts.Recordset.Fields(i)
sqlStr = sqlStr + " *'"
{in here there should be somethin like...
SDN.Open sqlStr
if SDN.Recordset.EOF
'DO nothing here
else
Call PRINT
end if
next i
loop

End Sub

Any help here would be great. I don't know much (if anything) about SQL so, don't get too bothered with this.

Matt