The field Track is a number (a double one).
In your module, you are trying to run an update query
Code:
sql = "UPDATE Tracks SET Track = " & 1 + ([Track] / 10) & " WHERE tID=" & c - 1
This query returns an error when run, because it is trying to add to string "UPDATE Tracks SET Track = " the value of expression (1 + ([Track] / 10)) - but there is no variable [Track] defined for this sub, not can the procedure to read it from somewhere. To be working, this code string must be
Code:
sql = "UPDATE Tracks SET Track = " & "1 + ([Track] / 10)" & " WHERE tID=" & c - 1
Now about what you get when you run this sub:
When Track = 1, you get 1 + 1/10 = 1.1;
When Track = 10, you get 1 + 10/10 = 2;
When Track = 11, you get 1 + 11/10 = 2.1;
When Track = 20, you get 1 + 20/10 = 3
Is this what you really want? Or do you really want values 1.01, 1.1, 1.11, 1.2, etc. instead. This you can get e.g. with query like
Code:
SELECT tID, CDbl("1." & RIGHT("00" & CStr(Track), 2)) AS ConvertedTrack
It assumes the original value of Track never gets >= 100. Otherwise you have to increase the number trailing zeros in ConvertedTrack formula of query.
And be aware, it depends on you regional settings, i.e. on your decimal delimiter, are you using "1." or "1," in same formula.