Originally Posted by
manicamaniac
I just need to complete the first column.
I need to copy the first number to the blank cells below.
When it reaches another value, it should copy the new value and paste at the blank cells below...
I don't know if there is a query that can do it, but the easiest way may be just to run the code below. PLEASE make sure to run the compiler BEFORE trying this code. It is not tested. thanks.
Code:
function pTbl()
dim db as dao.database
dim rs as dao.recordset
dim sNum as long
set db = currentdb
set rs = db.openrecordset("table name here")
with rs
.movelast
.movefirst
while not .eof
if not isnull(!Column1Name) or _
len(!Column1Name) < 1 or _
!Column1Name = "" then
sNum = !Column1Name
.movenext
else
.edit
!Column1Name = sNum
.update
.movenext
end if
wend
.close
db.close
end with
set rs = nothing
set db = nothing
end function