Let MshflexGrid no longer show extra decimal

zhaozj2021-02-16  57

When using MSHFLEXGRID, it shows a lot of bits after the decimal point. And us, we only need to accurately until the two digits of the decimal point. Below you will solve this problem with the SQL statement.

DIM SQL AS STRING SQL = "SELECT FORMAT (Discount, '## 0.00') AS Discount from table1" Rst.CursorLocation = aduseclient Rst.open SQL, "provider = microsoft.jet.Oledb.4.0; data source = d: / Tt.mdb; persist security info = false,, adcmdtext set mshflexgrid.recordset = Rst Rst.Close

Use the format () function in the Access database in the SQL database.

转载请注明原文地址:https://www.9cbs.com/read-22243.html

New Post(0)