Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Function UpdateIt(reftbl As String, refcol As String, pctcol As String)
Dim rs As ADODB.Recordset
Dim intValue As Integer
Dim dblPct As Double
Set rs = New ADODB.Recordset
rs.Source = "SELECT " & refcol & ", " & pctcol & " FROM " & reftbl
rs.ActiveConnection = CurrentProject.Connection
rs.CursorType = adOpenDynamic
rs.LockType = adLockOptimistic
rs.Open
intValue = rs(refcol).Value
rs.MoveNext
Do While Not rs.EOF
dblPct = 1 - (intValue / rs(refcol).Value)
rs(pctcol).Value = dblPct
rs.Update
intValue = rs(refcol).Value
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
End Function