Public Function countTime()
On Error GoTo ERR
Dim StrSQL As String
StrSQL = "SELECT * FROM qryPlanDurationTimeExtended where qryPlanDurationTimeExtended.contractID=" & "'" & ContractID.Value & "'"
这句是想表达选出相同的合同号码的时间
Debug.Print StrSQL
[Forms]![frmPlanDurationTime].DurationTime = StrSQL
Debug.Print Me.PlanDurationTime
Exit Function
ERR:
MsgBox ERR.Number & ERR.Description
End Function