Refreshing a SQLite DB

Hello,
I created a SQLite DB in which cells in a column change background color according to whatever data is typed in other cells.
It works but changes, to take effect, need to have the app restarted or the DB closed.
Is there a way to have the DB refresh “on the go” (i.e. without having to close and reopen the app or the DB)?
This request applies to other features as well, like having an updated total sum of values entered in a column or similar behaviors.

Thank you

Please post the code block that does the color change here. This makes it easier for members to spot a problem or to give recommendations.

Does the change in data happen in the same session where the color change should display?

You have to save the data and then load it from the database again. No need to close and re-open the database…

Thank you, do you think it might be made automatic somehow? For example by some code in the same save button?

Here’s the code:

"Dim a as String

a = Me.CellTextAt(row, 4)

Select Case column

Case 5

Select Case a

Case “Marzolara”

g.DrawingColor = &cFFE5B4

Case “Personale”

g.DrawingColor = &c00ff00

Case “Casa”

g.DrawingColor = &cCCCCFF

Case “Tasse”

g.DrawingColor = &cF400A1

Case “Wanda”

g.DrawingColor = &cD2B48C

Case “Varie”

g.DrawingColor = &cE4E5E0

Else

g.DrawingColor = &cFFFFFF

End Select

g.FillRectangle(2, 2, g.Width - 2, g.Height - 4)

End Select"

You have two select case here…

Yes, but I did not know how to point to a specific column and a specific text within the column. It works, though

seems it looks like
db open
query data
data to list view

if you save data from a form input to db you need to query it again.
you could also query a single row and exchange this single row in listview.
listview have row tag or column tag to store a refercence id.