Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
Private Sub Form_Load() '////// For recalculating quantities as a percent of Total Shipped. /////// Dim rs As Object, varPctShip As Single, varCurrVal As Single varPctShip = 0 varCurrVal = 0 Set rs = CurrentDb.OpenRecordset("tbl_temp_freight_sort_cost") With rs rs.MoveFirst '////// Cycle through columns, regardless of name and number. ////////// ' 1st Column is referenced as column zero. For i = 2 To rs.Fields.Count - 1 varCurrVal = rs.Fields(i).Value If varCurrVal <> 0 Then varPctShip = varCurrVal / (rs.Fields(1).Value) .Edit !rs.Fields(i) = varPctShip .Update End If Next rs.MoveNext End With End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.