"Sm******@aol.com" <Sm******@aol.comwrote in
news:11**********************@y42g2000hsy.googlegr oups.com:
Hi,
I am in need of some assistance. I have a table with the
following: Tel_St_Range Tel_End_Range Customer Name
6075551200 6075551300 Tom Smith
I would like to know how to break out the ranges into a new table
that looks like this:
Telephone Customer Name
6075551200 Tom Smith
6075551201 Tom Smith
6075551202 Tom Smith
............
6075551300 Tom Smith
Can anyone assist? I would really appreciate it.
Thanks,
Easy in VBA.Paste into a module, change SRCE and DEST as required,
then debug.
Dim rsFrom as DAO.recordset
Dim RsTo as DAO.recordset.
Dim Srce as string
Dim Dest as string
Dim lngCounter as long
SRCE = "name of source table"
DEST = "Name of new table"
set rsFrom = dbOpenRecordset(SRCE)
set rsTo = dbOpenRecordset(DEST)
Do while not rsFrom.EOF
For lngCounter = rsfrom!Tel_St_Range to rsfrom!Tel_End_Range
rsTo.addnew
rsto!Telephone = lngCounter
rsto![Customer Name] = rsFrom![Customer Name]
rsto.update
next
rsFrom.movenext
loop
Rsfrom.close
rsto.close
--
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from
http://www.teranews.com