View Full Version : Content Management - Most Recent Entry


polgara
05-24-2002, 02:50 AM
I'm developing a basic CMS for a small website and I'm just having some difficulty in getting my head around pulling the most recent entry to populate the page

Here's my current query:

SELECT tbl_page.PageTitle, tbl_content.PageContent, tbl_editor.EditorName, tbl_content.PublishDate, tbl_page.PageMetaKey, tbl_page.PageMetaDescription, tbl_page.PageID, tbl_content.PageHeader
FROM tbl_editor INNER JOIN (tbl_content INNER JOIN tbl_page ON tbl_content.PageRef = tbl_page.PageID) ON tbl_editor.EditorID = tbl_content.PageEditor

Can someone give me some direction?

David R
05-24-2002, 08:09 AM
If your query is correctly set up to sort the records (by PublishDate?), then use DoCmd.GoToRecord ,,acLast to jump to the last record on opening the form.

polgara
06-05-2002, 12:56 AM
This is to populate a web page so I need to pull the last entry - its not an Access form.

Pat Hartman
06-05-2002, 06:31 PM
Change the query to select the Top 1 record and add an order by PublishDate Desc.

This will order the recordset in descending order by PublishDate so the newest one is first and the Top 1 will select just the first record.