Specific Previous Record To Display On Continuous Form -
12-17-2010
, 08:06 AM
Hi Group
I have a table with data stored like below:
Date MCName PBNo
01/01/2009 CM1 1
01/01/2009 RS2 1
01/01/2009 RH1 5
02/01/2009 CM1 2
02/01/2009 RH1 6
03/01/2009 RS2 2
03/01/2009 CM1 3
05/01/2009 CM1 4
05/01/2009 RH1 7
I have a continous form which displays the data for each day i.e.
01/01/2009
CM1 1
RS2 1
RH1 5
What I would like to do is add a column to my form that would show the
previous PBNo for each MCName on the form.
05/01/2009
CM1 4 3
RH1 7 6
The purpose of the second (previous) PBNo is to determine if there are
any gaps (non sequential numbering) which would be highlighted on the
form using a simple conditional format.
My problem is how to acheive this as MCName(s) are scheduled so not
checked everday they could be as far as a fortnight between checks.
Therefore I would have to look for the previous date that a particular
MCName was checked and then extract the PBNo from that record. I was
thinking of somehow utilising the Dlookup function but I am unsure how
to go about it. Has anyone any ideas/clues how I should proceed.
Any help would be appreciated.
I am using Access 2002 SP3 on XP Pro SP2 |