[AccessD] Help with Syntax error

Joe Hecht jmhecht at earthlink.net
Wed Feb 8 14:15:01 CST 2006


The idea here is get the difference in years between 2
dates.

 

This is a global module.

 

Public Sub yearcalc(date1 As Date, date2 As Date)

   = int(Datediff("m", date1,date2)/12)

 End Sub

 

 

=int line returns syntax error

 

 

This is the code I want to call the above

 

Private Sub Form_BeforeUpdate(Cancel As Integer)

Dim DOB As Date

Dim txtIDATE As Date

 Set DOB = date1

 Set txtIDATE = date2

 Call yearcalc

 

Thanks

 

Joe Hecht

jmhecht at earthlink.net

 




More information about the AccessD mailing list