Filtering a recordset with an advanced SQL query
Posted on 2007-09-30
Using Dreamweaver and Access, I have a details page that uses an inner join that ties in two tables (a Leads and Estimates table).
The page preceding the details page is a master page where I click a specific record passing the primary key of that record (LeadID). When I click the link however, it always show me the same record and not the unique record.
I believe I need to build the detail page in a way so it filters on the proper record, but because of the advanced SQL I am not sure how to do that: (normally I'd use Simple mode and filter on the LeadID for the details page).
The SQL query for the details page containing the inner jion is as follows:
SELECT Leads.LeadID, Leads.FirstName, Leads.LastName, Leads.Address, Leads.City, Leads.StateOrProvince, Leads.ZipCode, Leads.Phone, Leads.Contractor, Leads.InstallDate, Estimates.EstimateNumber, Estimates.EstScheduledDate, Estimates.EstTime, Estimates.EstTotal, Estimates.EstAccepted, Estimates.InvoiceTotal, Estimates.PaidFull, Estimates.Notes, Estimates.cardtype, Leads.Removed, Leads.RemovalDate, Leads.Status, Estimates.guarantee, Estimates.InitAmtOwed, Estimates.InitAmtPaid, Estimates.InitAmtCheckNum, Estimates.RemovalAmtOwed, Estimates.RemovalAmtPaid, Estimates.RemovalAmtCheckNum
FROM Leads LEFT JOIN Estimates ON Leads.LeadID = Estimates.LeadID;
Thanks in advance for the help.