Copy data from previous record

T

Tito G

I have a table where the values in the first two columns, BranchNumber and
ReferenceNumber, have only been populated when they change. I want to create
a query which will automatically check the value and, if blank, copy from the
previous record. The first bit is fine but I cannot find any way which will
identify the previous record. Can anyone help, please? The table has over
500,000 rows so going down manually with Control+' is not really an option!

Many thanks.
 
K

KARL DEWEY

I normally do this type stuff in Excel but you got too many records.
Records are stored in a table like a barrel of bricks. Do you have a field
that will define 1st, 2nd, 3rd, etc record?
Post table and field names with datatype and sample data.
 
K

KARL DEWEY

I did not completely read your post.

Does your table have an autonumber?

Post sample data.
 
T

Tito G

Karl,

Sorry - In my previous note I missed the bit about wanting a sample. In the
example below if a record in the Branch column is blank copy date from
previous record. The same again for the Ref and A/cType columns. Any ideas,
please? Many thanks.

AutoN Branch Ref A/cType EntSer ESType ZeroPrice UnitPrice
1 89098 A13456 B55 Entry 075 0.050
2 Entry 076 0.050
3 Entry 150 0.170
4 Entry 170 0.030
5 Service 006 1; 0.000
6 Service 060 0; 8.000
7 47801 C59681 Z54 Entry 180 0.030
8 Entry 185 0.170
9 Entry 240 0.250
10 Entry 242 0.250
11 Entry 245 0.250
12 Service 069 0; 10.000
13 Service 073 0; 10.000
14 Service 078 0; 0.170
15 Service 134 0; 0.120
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top