|
Dim ARecordset As New ADODB.Recordset
Dim cmm As New ADODB.Command
Dim PrmIn1 As New ADODB.Parameter '第一个输入参数 :PrmIn1
Dim PrmIn2 As New ADODB.Parameter '第二个输入参数 :PrmIn2
cmm.ActiveConnection = CurrentProject.Connection
cmm.CommandType = adCmdStoredProc
cmm.CommandText = "考勤表"
PrmIn1.Type = adDate
PrmIn1 = [Forms]![修改考勤]![开始时间]
PrmIn1.Direction = adParamInput
cmm.Parameters.Append PrmIn1
PrmIn2.Type = adDate
'PrmIn2.Size = 8
PrmIn2.Value = [Forms]![修改考勤]![结束时间]
PrmIn2.Direction = adParamInput
cmm.Parameters.Append PrmIn2
'Cmm.Execute
ARecordset.Open cmm
', adOpenDynamic, adLockOptimistic
'"select * from 考勤表"
Do While Not ARecordset.EOF
For Each gg In ARecordset.Fields
MsgBox gg.Name & gg.Value
Next
ARecordset.MoveNext
Loop |
|