M
May
Assume you create a text control with the name text3
Dim str As String
Dim stringlocation As Integer
Dim y As Integer
Dim roundnum As Double
Dim result As Double
Let stringlocation = InStr(Text3, ".")
Let y = Mid(Text3, stringlocation + 1, 2)
Select Case y
Case 1 To 2
roundnum = 0
Case 3 To 8
roundnum = 0.5
Case 9
roundnum = 1
End Select
Let result = Left(Text3, stringlocation - 1) + roundnum
MsgBox result
May
MCP in Access and SQL Server
Dim str As String
Dim stringlocation As Integer
Dim y As Integer
Dim roundnum As Double
Dim result As Double
Let stringlocation = InStr(Text3, ".")
Let y = Mid(Text3, stringlocation + 1, 2)
Select Case y
Case 1 To 2
roundnum = 0
Case 3 To 8
roundnum = 0.5
Case 9
roundnum = 1
End Select
Let result = Left(Text3, stringlocation - 1) + roundnum
MsgBox result
May
MCP in Access and SQL Server