最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

【金額轉(zhuǎn)換成中文大寫】【進(jìn)入窗體設(shè)計視圖】【鏈接外部數(shù)據(jù)庫只能查看數(shù)據(jù)】

2022-10-28 10:34 作者:凌霄百科  | 我要投稿

金額轉(zhuǎn)換成中文大寫

Private Sub Command轉(zhuǎn)換_Click()

If Me.金額數(shù)字 <> "" Then

? ? If IsNumeric(Me.金額數(shù)字) = True Then

? ? ? ? Me.金額大寫 = rmb(Me.金額數(shù)字)

? ? Else

? ? MsgBox "請輸入數(shù)字"

? ? Exit Sub

? ? End If

End If

End Sub



Public Function rmb(s As Currency) As String? ? '人民幣轉(zhuǎn)大寫

Dim s1, s2, l, x

? ? s1 = LTrim(CStr(Abs(s)))

? ? l = Len(s1)

? ? Select Case l - InStrRev(s1, ".")

? ? '雙引號內(nèi)是小數(shù)點

? ? ? ?Case l

? ? ? ? ?s2 = s1 + ".00"

? ? ? ?Case 1

? ? ? ? ?s2 = s1 + "0"

? ? ? ?Case 2

? ? ? ? ?s2 = s1

? ? End Select

? ? l = Len(s2)

? ? Dim dx, c1, c2

? ? dx = ""

? ? c1 = "零壹貳叁肆伍陸柒捌玖"

? ? c2 = "分角 元拾佰仟萬拾佰仟億拾佰"

? ? '角和元之間留一個空格

? ? ?Do While l >= 1

? ? ?x = Mid(s2, Len(s2) - l + 1, 1)

? ? ?

? ??

? ? If x <> "." Then

? ? dx = dx + Mid(c1, Val(x) + 1, 1) + Trim(Mid(c2, (l - 1) + 1, 1))

? ? End If

? ? ?l = l - 1

? ? ?Loop

? ? ?rmb = dx + "整"

End Function


進(jìn)入窗體設(shè)計視圖

Private Sub Command打開_Click()

If Me.窗體列表 <> "" Then

DoCmd.Minimize

DoCmd.OpenForm Me.窗體列表, acDesign

End If


End Sub


Private Sub Command設(shè)計視圖_Click()

DoCmd.OpenForm "演示窗體", acDesign

End Sub


鏈接外部數(shù)據(jù)庫只能查看數(shù)據(jù)

Private Sub Form_Load()

Dim df_conn As New ADODB.Connection

'------------------------------------------------------------------

With df_conn

? ? .Provider = "microsoft.ace.oledb.12.0;Jet OLEDB:Database Password='abc123'"

? ? .ConnectionString = CurrentProject.Path & "\報價表.accdb"

? ? .Open

End With

'------------------------------------------------------------------

Dim dflink_rs As New ADODB.Recordset

dflink_rs.CursorLocation = adUseClient

Dim dflink_sql As String

dflink_sql = "SELECT * FROM 商品報價表"

dflink_rs.Open dflink_sql, df_conn, adOpenDynamic, adLockOptimistic

Set Me.Recordset = dflink_rs

dflink_rs.Close

Set dflink_rs = Nothing

df_conn.Close

Set df_conn = Nothing


Exit Sub

數(shù)據(jù)獲取失敗:

MsgBox Err.Description

End Sub


【金額轉(zhuǎn)換成中文大寫】【進(jìn)入窗體設(shè)計視圖】【鏈接外部數(shù)據(jù)庫只能查看數(shù)據(jù)】的評論 (共 條)

分享到微博請遵守國家法律
保靖县| 衡东县| 佛坪县| 龙江县| 曲周县| 寿阳县| 安多县| 长沙市| 策勒县| 花莲市| 卓资县| 柳江县| 天等县| 桐梓县| 和田县| 孟连| 鄯善县| 大足县| 东至县| 杭锦后旗| 平顶山市| 广水市| 衡水市| 平果县| 永仁县| 项城市| 涪陵区| 曲阜市| 教育| 孝感市| 甘谷县| 精河县| 鄄城县| 临清市| 娄烦县| 平邑县| 巨鹿县| 新疆| 桂东县| 昌黎县| 茂名市|