populating data fields with previous data

  • Thread starter Thread starter Bolivar
  • Start date Start date
B

Bolivar

I have a table that I need to populate the missing data with the data field
preceding it. Can I do this with a query?
 
Since records have no inherent order, you need to be able to specify
which record precedes the current record using criteria with the two
records.

For instance, if the records have a sequential number with no gaps the
preceding record for record 85 would be the record with 84.



'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
just learning! I posted another search befor I saw the reply button
What I have is thousands of records that have a reference number in one
field and data assigned to it in another the ref num does not populate to the
next field:
exp Ref Data
123 ada
cac
dde
322 cee
prt
724
as many as 100 items can be associated with one ref num
 
From your description of the table I would say that there is no way to
use a query to update the values in the table.

You ***MIGHT*** be able to use a recordset in a VBA routine to "fix" the
values by stepping through the records, but I would not trust that to be
reliable.

I am guessing you are importing these records from some source. Perhaps
that would be a better location to "fix" the problem.

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
cough there is no real thing as order in a databasethe cell before can
change under 100 conditions i suggest you export it to excel and then
do it then import it back.
 
Back
Top