R
rmullen
(all is in office 2K3) I'm exporting an access query to excel (via
vba), problem is that the things i am exporting lose their formatting.
instead of coming over as numbers, they're coming over as text.
do you guys have any ideas on how i can keep fields formatted as a
number? is there anyway to typecast the value that i am inputting into
the excel sheet?
sqlrst = "fields from excel"
rst = CurrentDb.etc(sqlrst)
sqlCmd = "stuff here"
rs = CurrentDb.etc.(sqlCmd)
Do While Not rs.EOF
rstTarget.AddNew
rstTarget![MainID] = rs!MainID
loop
is how i'm pulling in the data (i didn't feel like typing it all out).
like i said it all works fine .. minus the fact that it doesn't keep
the number formatting.
thanks in advance for any help, and i can provide more code if it's
needed.
cheers!
vba), problem is that the things i am exporting lose their formatting.
instead of coming over as numbers, they're coming over as text.
do you guys have any ideas on how i can keep fields formatted as a
number? is there anyway to typecast the value that i am inputting into
the excel sheet?
sqlrst = "fields from excel"
rst = CurrentDb.etc(sqlrst)
sqlCmd = "stuff here"
rs = CurrentDb.etc.(sqlCmd)
Do While Not rs.EOF
rstTarget.AddNew
rstTarget![MainID] = rs!MainID
loop
is how i'm pulling in the data (i didn't feel like typing it all out).
like i said it all works fine .. minus the fact that it doesn't keep
the number formatting.
thanks in advance for any help, and i can provide more code if it's
needed.
cheers!