access查詢計算公式?
access數據庫計算年齡的方法如下:1.打開access創建一個窗體:
2 輸入出生日期,比如1999/12/1,點擊計算:
3 在宏代碼塊輸入以下代碼:
Dim birth As String
Dim age As Integer
birth = Me.Text8.Value
age = Round(DateDiff("y", birth, Date) / 365, 0)
Me.Text12.Value = age
access查詢計算公式?
access數據庫計算年齡的方法如下:1.打開access創建一個窗體:
2 輸入出生日期,比如1999/12/1,點擊計算:
3 在宏代碼塊輸入以下代碼:
Dim birth As String
Dim age As Integer
birth = Me.Text8.Value
age = Round(DateDiff("y", birth, Date) / 365, 0)
Me.Text12.Value = age