dbTalk Databases Forums  

Specific Previous Record To Display On Continuous Form

comp.databases.ms-access comp.databases.ms-access


Discuss Specific Previous Record To Display On Continuous Form in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
The Pipe
 
Posts: n/a

Default 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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.