Archive for 日記
Access 切り上げRoundUp 切り捨てRoundDown 四捨五入Round
久しぶりにAccess触ったら嵌ったので・・・・
なんだこのVBA関数は・・・まともに動かん
'*******************************************************************************************
'注意!!!!!!!!!
'AccessのRound,Int,FIx関数はバグっているので、自ら作成する!
'*******************************************************************************************
'切り上げ
Public Function com_RoundUp(X As Currency, S As Integer) As Currency
Dim W As Currency
W = 10 ^ Abs(S)
If S > 0 Then
com_RoundUp = Int(X * W + 0.999) / W
Else
com_RoundUp = Int(X / W + 0.999) * W
End If
End Function
'切り捨て
Public Function com_RoundDown(X As Currency, S As Integer) As Currency
Dim W As Currency
W = 10 ^ Abs(S)
If S > 0 Then
com_RoundDown = Int(X * W) / W
Else
com_RoundDown = Int(X / W) * W
End If
End Function
'四捨五入
Public Function com_Round(X As Currency, S As Integer) As Currency
Dim t As Integer
t = 10 ^ Abs(S)
If S > 0 Then
com_Round = Int(X * t + 0.5) / t
Else
com_Round = Int(X / t + 0.5) * t
End If
End Function
MSからGetだけ。。。ど(^^;)
Firefox4の検索結果を新しいタブで開く etc…
Firefox4のが正式リリースされましたね!
IE9も悪くないが、Firefoxの方がやっぱり早く感じます。
筆者の設定の一部を紹介
+++検索結果を新しいタブで開くには+++
アドレスバーでabout:configと入力する
browser.search.openintabを見つけてfalseになっているのをtrueにしてあげる
+++ブックマークを新しいタブで開くには+++
マウスのミドルクリック Or 「Open bookmarks in new tab」のアドオン
+++左側でタブ管理+++
「ツリー型タブ」のアドオン
以上
Firefoxも後はお気に入りのアドオンが対応すれば、本格的に使用できそうです!
IE9もF12でがんばってるけど、今後も開発者にはFirefoxとFireBugが欠かせないなぁ