VB application: use commas in TextBox to distinguish data

xiaoxiao2021-03-06  43

--------- VB Application: Use a comma to distinguish between TextBox ------------

The main role is to query the database, require the same field of multiple queries, the generation of SQL statements, the following code is a comma-separated data using a TextAfter.

DIM INTTEXTLEN, I, K AS INTEGER

Dim Textbefore, TextAfter (100) AS STRING

INTTEXTLEN = LEN (TextBox1.text)

K = 1

TEXTBEFORE = TextBox1.text

For i = 1 to inttextlen

IF MID (TextBefore, I, 1) = "," THEN

K = 1

Else

TextAfter (k) = TextAfter (K) & Mid (TextBefore, i, 1)

END IF

NEXT

to be continued

----------- End --------------

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

New Post(0)