設(shè)為首頁收藏本站Access中國

Office中國論壇/Access中國論壇

 找回密碼
 注冊

QQ登錄

只需一步,快速開始

返回列表 發(fā)新帖
樓主: tmtony
打印 上一主題 下一主題

[Access本身] Access技巧接龍

[復(fù)制鏈接]
31#
發(fā)表于 2005-1-25 03:36:00 | 只看該作者
樓上非常棒!
32#
發(fā)表于 2005-1-28 04:14:00 | 只看該作者
哇,這么多好技巧,我也弄了一些,在:http://www.accessoft.com/Article_Special.asp?SpecialID=1
33#
發(fā)表于 2005-2-2 08:57:00 | 只看該作者
vba.kill

vba.copy

34#
發(fā)表于 2005-3-9 23:50:00 | 只看該作者
hehe這個好玩
35#
發(fā)表于 2005-3-23 20:45:00 | 只看該作者
ceiling函數(shù)  是Excel中的向上舍入函數(shù),可以在引用Excel對象庫后使用(包括其它Excel中的函數(shù)),如msgbox Excel.WorksheetFunction.Ceiling(129.99,0.05)另外也可以在Access中自定義:Public Function Ceiling(Num As Double, Sign As Double) As Double

    Dim intDot As Integer

    intDot = IIf(InStr(Sign, ".") = 0, 0, Len(Sign) - InStr(Sign, "."))

    Num = Int(Num * 10 ^ intDot)

    Sign = Sign * 10 ^ intDot

    Ceiling = (Num + IIf(Num Mod Sign = 0, 0, Sign) - (Num Mod Sign)) / 10 ^ intDot

End Function





36#
發(fā)表于 2005-3-26 03:39:00 | 只看該作者

我也正有一個這樣的問題急待回答

如何讓OLE對象反映到窗體或報表上的尺寸正好匹配

在數(shù)據(jù)庫中保存或鏈接的OLE對象,反到窗體和報表上尺寸大小不匹配,有時只是顯示局部一點,怎樣使其匹配。請幫助.
37#
發(fā)表于 2005-3-29 20:48:00 | 只看該作者
好厲害
38#
發(fā)表于 2005-3-30 16:39:00 | 只看該作者
下面的程序效率不是很高,但超大整數(shù)乘法、加法的函數(shù)還是比較實用

Public Function factorial(num As Integer) As String

    factorial = "1"

    For num = num To 1 Step -1

        factorial = strMult(factorial, Trim(Str(num)))

    Next

End Function'1000 的階乘=40238726007709377354370243392300398571937...用時6分鐘

'超大整數(shù)乘法 (需調(diào)用下面的strAdd、strPlus自定義函數(shù))

Public Function strMult(str1 As String, str2 As String) As String

    Dim i As Integer

    If Len(str2) = 1 Then

        strMult = IIf(str2 = "0", "", str1)

        For i = 1 To Val(str2) - 1

            strMult = strAdd(strMult, str1)

        Next

    Else

        strMult = strAdd(strMult(str1, Right(str2, 1)), strMult(str1 & "0", Left(str2, Len(str2) - 1)))

    End If

End Function'超大整數(shù)加法 (需調(diào)用下面的strPlus自定義函數(shù))

Public Function strAdd(str1 As String, str2 As String) As String

    If Len(str1) < Len(str2) Then

        strAdd = strAdd(str2, str1)

    Else

        Dim num As Long

        strAdd = strPlus(str1, "", Val(Right(str2, 1)))

        For num = 1 To Len(str2) - 1

            strAdd = strPlus(Left(strAdd, Len(strAdd) - num), Right(strAdd, num), Val(Mid(str2, Len(str2) - num, 1)))

        Next

    End If

End FunctionPublic Function strPlus(str1 As String, str2 As String, num As Integer) As String

    If Len(str1) = 1 Then

        strPlus = (Val(str1) + num) & str2

    Else

        num = Val(Right(str1, 1)) + num

        If num < 10 Then

            strPlus = Left(str1, Len(str1) - 1) & num & str2

        Else

            strPlus = strPlus(Left(str1, Len(str1) - 1), (num Mod 10) & str2, 1)

        End If

    End If

End Function

39#
發(fā)表于 2005-3-30 21:37:00 | 只看該作者

有用。只是,看了半天才明白。

只是中文的ASC碼,從哪里能找到呢?
40#
發(fā)表于 2005-3-31 20:26:00 | 只看該作者
俺是菜鳥,啥都看不懂。
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則

QQ|站長郵箱|小黑屋|手機(jī)版|Office中國/Access中國 ( 粵ICP備10043721號-1 )  

GMT+8, 2024-10-23 06:28 , Processed in 0.221987 second(s), 33 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回復(fù) 返回頂部 返回列表