|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
求助中!!!!
当程序运行到红字处时提示错误
If DLookup("预约位", "RecAPP", "日期=#" & Me.Combodatelist & "#" & " And 时间段='" & _
Me.ComboTimelist & "'") > 0 Then
If (CLng(Me.总箱数) + Nz(DSum("总箱数", "NORMAL APP", "送货日期=#" & Me.Combodatelist & "#" & " And 送货时间='" & _
Me.ComboTimelist & "' and CInt(Mid([预约号], 3, 3)) < 400 or [预约号] Like '__6__'"))) > (IIf(IsNull(Me.AppStatussubform!计划可约箱数), 0, Me.AppStatussubform!计划可约箱数)) * 1.1 Then
overcase = (CLng(Me.总箱数) + Nz(DSum("总箱数", "NORMAL APP", "送货日期=#" & Me.Combodatelist & "#" & " And 送货时间='" & _
Me.ComboTimelist & "' and CInt(Mid([预约号], 3, 3)) < 400 or [预约号] Like '__6__'"))) - (IIf(IsNull(Me.AppStatussubform!计划可约箱数), 0, Me.AppStatussubform!计划可约箱数)) * 1.1
If MsgBox("输入的箱数将大于“该时段计划可约总箱数的10%,共超出: " & overcase & "箱”,<OK> 继续预约,<Cancel> 改其它时间预约!", vbOKCancel, "警告") = vbOK Then
formnew.show 1 (出现错误:用户变量未定义)我已建立有formnew窗体了,
Call Access
If authotest = True Then
If MsgBox("确认要增加吗?", vbOKCancel, "确认") = vbCancel Then
Exit Sub
End If
Else
Me.ComboTimelist.SetFocus
Exit Sub
End If
Else
Me.ComboTimelist.SetFocus
Exit Sub
End If
|
|