This all depends on whether or not there is some field that can be used to keep these records in order, as rows in a table are not stored in any particular order. If you have no such field, but you are _certain_ the rows are in the order you want, just add an autonumber field to the table. I'll assume for now that you've got this table scheme:
tblWhatever
===========
WhateverID (autonum)
CostCode
Make a sub that looks like this:
sub
SCREEEECH. Wait. Whoa. This is all wrong. I must be a little spacey today. Here's the thing. These data items should be stored in separate fields. There's no way that it will make sense to have both the four digit and two digit portions of this in the same field. They represent different bits of data, so they should be in different fields. If you don't like the sound of that, check out the Fundamentals article on my website for tips on why you'll want to normalize these data. Then, for displaying and printing, you'll be able to do this
format([CCSuper], "0000"

& "." & format([CCSub], "00"
That said, you'll still probably need some code to get the right values in the right field, so here's how I'd go about it. First, make your table like this:
tblWhatever
===========
WhateverID (autonum)
CCSuper (numeric)
CCSub (numeric)
CostCode (text = your original field)
(just changed the names so there's less typing for me)
Sub Whatever()
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strSql As String
Dim lngSuper As Long
Dim lngSub As Long
Set db = CurrentDb
strSql = "SELECT * FROM tblWhatever ORDER BY WhateverID"
Set rst = db.OpenRecordset(strSql, dbOpenDynaset)
lngSuper = CLng(rst("CostCode"

)
Do Until rst.EOF
lngSub = rst("CostCode"

If Right(rst("CostCode"

, 1) = "." Then
lngSuper = CLng(rst("CostCode"

)
lngSub = 0
End If
rst.Edit
rst("CCSuper"

= lngSuper
rst("CCSub"

= lngSub
rst.Update
rst.MoveNext
Loop
rst.Close
Set rst = Nothing
db.Close
Set db = Nothing
End Sub
Hope this helps.
Jeremy ==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done
Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.