Updating table records

vipersmind

it can't be!
Local time
Today, 11:12
Joined
Dec 26, 2002
Messages
82
Hiya
I am trying to update null fields in a table with records from another field using the following code.
Code:
Public Function FillFrom()
Dim rs As DAO.Recordset
Dim strPrevTo As Integer
Set rs = CurrentDb.OpenRecordset("tblOxidation_ExprtPoint")

Do Until rs.EOF

     If IsNull(rs("From")) Then
         rs.Edit
         rs("From") = strPrevTo
         rs.Update
     End If

strPrevTo = rs("To")
rs.MoveNext
Loop

End Function
the trouble is if I have decimal places it will not copy them from strPrevTo to the next [From]. I end up with whole numbers.
Any idaes how I could make it bend to my will................ submit! submit! you damn thing.:mad:
 
Well the most obvious thing wrong is that you have assigned strPrevTo as an INTEGER and an Integer is a Whole number (no decimal places).

What you want is Decimal, Single, or Double (depending on how large a number you will hold).
 
uh huh

if you stare at something long enough it starts to blur
Thanks 2 easy:D :D :D
 

Users who are viewing this thread

Back
Top Bottom