Filling Blank Rows with Data

W

Wats

I have a table in access with empty rows that I want
filled with data from previous rows. Example:

Subline Data
12345 xxxxx
xxxxx
xxxxx
45858 xxxxx
xxxxx
xxxxx

I would like this table to read like the following:

Subline Data
12345 xxxxx
12345 xxxxx
12345 xxxxx
45858 xxxxx
45858 xxxxx
45858 xxxxx

Is there an updated query I can run that will accomplish
this task? Help!

Thanks.
 
D

Duane Hookom

There are not really any previous or next rows in Access unless you specify
a field/expression to sort on. Your example doesn't have this
field/expression.
 
J

John Vinson

I have a table in access with empty rows that I want
filled with data from previous rows. Example:

Subline Data
12345 xxxxx
xxxxx
xxxxx
45858 xxxxx
xxxxx
xxxxx

If that's all that there is in your table you are out of luck. A
relational database IS NOT A SPREADSHEET - there is no intrinsic order
to the rows; there *is* no "previous record" or "next record", the
records are like stones in a bucket.

If you're importing this from text or Excel, you can create a third
field which is unique to each record (a Primary Key) and ensure that
it is sorted - you can then (with some difficulty) run an Update query
to do what you ask. But as stated, the answer is "sorry, you can't."
 

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