Function Money(Number As Currency)
Dim i, j, k, m, leng As Integer '計(jì)數(shù)器
Dim Zero As Integer '連續(xù)零標(biāo)識(shí)
Dim Tnumber As String '儲(chǔ)存數(shù)字字符串,計(jì)算數(shù)組長(zhǎng)度
Dim Num() As String '定義數(shù)組
...
在窗體中修改數(shù)據(jù)時(shí),關(guān)閉窗體,數(shù)據(jù)已經(jīng)修改,這樣很容易產(chǎn)生錯(cuò)誤數(shù)據(jù).
可采用如下方法解決:
在窗體更新前判斷:
Private Sub FORM_BeforeUpdate(Cancel As Integer)
If MsgBox(保存嗎?, vbYesNo, M ...
Function FormattedMsgBox( _
Prompt As String, _
Optional Buttons As VbMsgBoxStyle = vbOKOnly, _
Optional Title As String = vbNullString, _
Optional HelpFile As Variant, _
Optional Context As ...
類(lèi)的屬性可以使用屬性過(guò)程Property Let和Property Get,如果您會(huì)使用Public變量,一定會(huì)說(shuō):在類(lèi)模塊中使用一個(gè)Public變量來(lái)替代Property Let和Property Get過(guò)程不是一樣的嗎?比如:
Public Property Let UserNam ...
下面這個(gè)竅門(mén)將教會(huì)你如何加速數(shù)據(jù)庫(kù)的訪問(wèn)速度,當(dāng)人們要讀取一個(gè)數(shù)據(jù)庫(kù)時(shí)往往會(huì)這么做:
Do while not records.eof
combo1.additem records!
records.movenext
loop
經(jīng)常遇到的問(wèn)題是每次數(shù)據(jù) ...
Function fstrTran(ByVal sInString As String, _
sFindString As String, _
sReplaceString As String) As String
Dim iSpot As Integer, iCtr As Integer
Dim iCount As Integer
iCount = ...