Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pass through query??

Status
Not open for further replies.

qajussi

Programmer
Mar 22, 2004
236
US
I thought I understood pass through query.
Can you explani this for me??
I have this pass through query.
ptPersonAddress =>
SELECT Person.ID, Person.LastName, Address.City
FROM Person INNER JOIN Address on Address.PersonID = Person.ID
WHERE Address.ID = '{90545B04-AEDB-4290-924B-345555AC8FD7}'

SUB SomeSub()
strSQL="SELECT * FROM Person WHERE Person.ID = " & strParentID

CurrentDb.QueryDefs("ptPersonAddress").SQL = strSQL
!subPersonAddress.Form.recordSource = "ptPersonAddress"

End SUB

CurrentDb.QueryDefs("ptPersonAddress").SQL = strSQL
1)Is this like a filter??
ptPersonAddress gives a view and strSQL is like querying from that view??


2) OK I got a view and filer that recordset and linking that to the subform??

but this line looks like i am linking to the view, not to the filter recordset??
!subPersonAddress.Form.recordSource = "ptPersonAddress"


I guess I don't know how to use DAO since i am asking these.
Can you help??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top