
Syntax: xxx = yyy (Fix(Val(ya ya ya))) ???
The following code works fine.
In the line of code: << Call EvaluateAge(Val(Me!txtAge)) >>
I dont understand << EvaluateAge >> and << (Val(Me!txtAge)) >> work
together.
Where is it determined that iAge = Me!txtAge?
Then in the next line of code: << iAgeInten = AgePlus10(Fix(Val(Me!txtAge)))
Quote:
>> can you please explain the mechanics of (Fix(Val(XXX)))?
Option Compare Database
Option Explicit
Dim micounter As Integer
Private Sub EvaluateAge(iAge As Integer)
If iAge < 30 Then
MsgBox "Are you telling the truth?"
End If
End Sub
Function AgePlus10(iAge As Integer)
AgePlus10 = iAge + 10
End Function
Sub cmdOkay_Click()
Dim iAgeInten As Integer
If IsNull(Me!txtName) Or IsNull(Me!txtAge) Then
MsgBox "You must fill in name and age"
Exit Sub
Else
MsgBox "your name is: " & Me!txtName & " and your age is: " &
Me!txtAge
Call EvaluateAge(Val(Me!txtAge))
i AgeInten = AgePlus10(Fix(Val(Me!txtAge)))
MsgBox "In 10 years you will be " & iAgeInten
End If
End Sub
--
George Padvorac
Guam