財(cái)務(wù)人員都知道,轉(zhuǎn)賬支票的出票日期是需要大寫(xiě)的。如果用手寫(xiě),當(dāng)然可以直接填寫(xiě)成大寫(xiě),但如果設(shè)計(jì)專(zhuān)用軟件進(jìn)行套打,每張支票都在固定位置填寫(xiě)大寫(xiě)會(huì)很麻煩,也沒(méi)有必要。這里僅以Access2007設(shè)計(jì)為例,給這方面的愛(ài)好者提供一個(gè)思路。
一、先設(shè)計(jì)一個(gè)Access2007表,加入轉(zhuǎn)賬支票可能需要的字段,比如付款人名稱(chēng)、付款人賬號(hào)、收款人名稱(chēng)、付款金額、出票日期等等。其中的“出票日期”設(shè)成“日期”類(lèi)型,默認(rèn)值可以設(shè)成“date()”(即當(dāng)天日期)。表設(shè)計(jì)好后命名保存?zhèn)溆谩?BR> 二、新建模塊,并輸入以下內(nèi)容
Public Function Udate(mDATE As Date, mYMD As Integer) As String
'用法 Udate(#1/2/2005#, i)
'i=1 貳零零伍
'i=2 零壹
'i=3 零貳
'i=0 貳零零伍年零壹月零貳日
Dim i As Integer, iD As Integer
Dim strDT(2) As String, strS As String
Dim strD(0 To 9) As String * 1
strD(0) = "零"
strD(1) = "壹"
strD(2) = "貳"
strD(3) = "叁"
strD(4) = "肆"
strD(5) = "伍"
strD(6) = "陸"
strD(7) = "柒"
strD(8) = "捌"
strD(9) = "玖"
一、先設(shè)計(jì)一個(gè)Access2007表,加入轉(zhuǎn)賬支票可能需要的字段,比如付款人名稱(chēng)、付款人賬號(hào)、收款人名稱(chēng)、付款金額、出票日期等等。其中的“出票日期”設(shè)成“日期”類(lèi)型,默認(rèn)值可以設(shè)成“date()”(即當(dāng)天日期)。表設(shè)計(jì)好后命名保存?zhèn)溆谩?BR> 二、新建模塊,并輸入以下內(nèi)容
Public Function Udate(mDATE As Date, mYMD As Integer) As String
'用法 Udate(#1/2/2005#, i)
'i=1 貳零零伍
'i=2 零壹
'i=3 零貳
'i=0 貳零零伍年零壹月零貳日
Dim i As Integer, iD As Integer
Dim strDT(2) As String, strS As String
Dim strD(0 To 9) As String * 1
strD(0) = "零"
strD(1) = "壹"
strD(2) = "貳"
strD(3) = "叁"
strD(4) = "肆"
strD(5) = "伍"
strD(6) = "陸"
strD(7) = "柒"
strD(8) = "捌"
strD(9) = "玖"