Code:
Private Sub TextBox_AfterUpdate()
If Not IsNull(Me![TextBox]) Then
'No Variables are declared
Select Case Me![TextBox]
Case Is < 0
E = m * c ^ 2
Case 0
Pi = 4 * Atn(1#)
Case 1 To 4
j = -b + Sqr(453)
Case 5, 6
a = b + c
Case 7
R = Pi * R ^ 2
Case 8
P = 2 * (l + w)
Case 9
gr = Rnd()
Case 10
a = ((b1 + b2) / 2) * (a ^ 2)
Case "..." 'etc., etc.
Case Else
'General Formula for all 'other' possibilities
End Select
End If
End Sub
I know that if you attempt to convert a date in SQL server, and the field is too small for the date (i.e yyyymmdd to yyyy/mm/dd) it will still put as many characters into the field as possible.
Obvious things to check for would be field formats etc, but i'm not good in VBA so cannot really help you with the code much.