|
3#
楼主 |
发表于 2010-3-28 14:03:50
|
只看该作者
andymark ,您好,因为文件大,无法上传。我把代码发上来,您能帮我看看么?
Private Sub Form_Current()
allowSave = False
If DCount("*", "报案人情况表") < 1 Then
Me.案件编号 = Right(Format(Date, "yyyymm"), 6) & 0 & 0 & 0 + 1
Exit Sub
End If
If Me.NewRecord Then
Me.案件编号 = Right(Format(Date, "yyyymm"), 6) & Format(Val(Right(DMax("ajID", "报案人情况表"), 2) + 1), "000")
End If
Me.保存.Enabled = True '使“保存”按钮可用
Me.添加新记录.Enabled = False ' '使“添加新记录”按钮不可用
Me.bjrq = Format(Date, "yyyy年mm月dd日") & Format(Time, "hh时mm分")
Me.fxrq = Format(Date, "yyyy年mm月dd日") & Format(Time, "hh时mm分")
Me.farq1 = Format(Date, "yyyy年mm月dd日") & Format(Time, "hh时mm分")
Me.farq2 = Format(Date, "yyyy年mm月dd日") & Format(Time, "hh时mm分")
Me.cjrq = Format(Date, "yyyy年mm月dd日") & Format(Time, "hh时mm分")
Me.bjrqsj = Val(Left(Format(bjrq, "yyyymmdd") & Format(Time, "hhmm"), 8))
Me.ajIDsz = Val(ajID)
End Sub |
|