Hi,
I have a Public Sub in my modules:
In my form upon cmd button "OK" is clicked, it will use the Public Sub CalcAge function:
- dates in Text16 and Text18 will be input into CalcAge and Text20 will display the "yrs, mths, days" from CalcAge
- however i will get an error msg at the statement :
- did i wrote correctly for the abv statement?
I have a Public Sub in my modules:
Code:
Public Sub CalcAge(vDate1 As Date, vdate2 As Date, ByRef vYears As Integer, ByRef vMonths As Integer, ByRef vDays As Integer)
In my form upon cmd button "OK" is clicked, it will use the Public Sub CalcAge function:
Code:
Private Sub cmdOK_Click()
Dim bday As Date
Dim input_date As Date
Dim yrs As Integer
Dim mths As Integer
Dim days As Integer
bday = Me.Text16
input_date = Me.Text18
Me.Text20 = CalcAge(bday, input_date, yrs, mths, days)
End Sub
- dates in Text16 and Text18 will be input into CalcAge and Text20 will display the "yrs, mths, days" from CalcAge
- however i will get an error msg at the statement :
Code:
Me.Text20 = CalcAge(bday, input_date, yrs, mths, days)
- did i wrote correctly for the abv statement?