I have no idea what you're trying to do, your question is about as clear as mud. However, I'm gonna take a stab at it.
Try something like this:
Dim db as Database
Dim rec as Recordset
Db = CurrentDB
'This assumes you're pulling one specific record from a table with many records
rec = db.OpenRecordSet("Select * from YourTableName WHERE Something = SomethingElse")
Do While rec.EOF = False
MyFirstValue = rec(0)
MySecondValue = rec(1)
MyThirdValue = rec(2)
...ect
Loop
sSQL = "Select * from Whatever WHERE FirstParam = '" & MyFirstValue & "' AND SecondParam = '" & MySecondValue & "' AND ThirdParam = '" & MyThirdValue & "'"
That is gonna need a lot of editing, but if I understood correctly, it should be a good starting point.