Hi I have a table with the following fields feed_FTMEX, Feed_XD_Date with data like the below
feed_FTMEX feed_xd_date
PLPFIA 01-Aug-88
PLPFIA 01-Nov-88
PLPFIA 16-Jan-89
PLPFIA 16-Apr-89
PLPFIA 16-Jul-89
PLPFIA 15-Oct-89
PLPFIA 15-Jan-90
PLPFIA 15-Apr-90
PLPFIA 15-Jul-90
PLPFIA 15-Oct-90
PLPFIA 15-Jan-91
PLPFIA 16-Apr-91
PLPFIA 16-Jul-91
PLPFIA 16-Oct-91
PLPFIA 16-Jan-92
PLPFIA 16-Apr-92
PLPFIA 16-Jul-92
PLPFIA 16-Oct-92
PLPFIA 16-Jan-93
PLPFIA 16-Apr-93
what i want to do is create a query that returns the previous date for each record so my query is like this
SELECT tbl_feed.feed_FTMEX, tbl_feed.feed_xd_date, DMax(“[feed_xd_date]”,”[tbl_feed]”,” [feed_xd_date] <# " & [feed_xd_date] & "# and [feed_FTMEX] ='" & [feed_FTMEX] & "'") AS Expr1
FROM tbl_feed;
The problem is im getting plenty of blank records, I cant see what i am doing wrong