|
3#
楼主 |
发表于 2014-9-25 22:26:17
|
只看该作者
Private Sub Report_Load()
On Error GoTo Err_Report
Debug.Print Me.[Busline1], Me.[Busline2], Me![Busline3], Me![Busline4], Me![Busline5]
Me!Busmonitor1 = DLookup("Busmonitor", "tbl_schoolbus", "tbl_schoolbus.busNo ='" & Me![Busline1] & "'") '"条件字段名 = '" & forms!窗体名!控件名 & "'"
Me.Busmonitor2 = DLookup("Busmonitor", "tbl_schoolbus", "tbl_schoolbus.busNo ='" & Me![Busline2] & "'")
Me.Busmonitor3 = DLookup("Busmonitor", "tbl_schoolbus", "tbl_schoolbus.busNo ='" & Me![Busline3] & "'")
Me.Busmonitor4 = DLookup("Busmonitor", "tbl_schoolbus", "tbl_schoolbus.busNo ='" & Me![Busline4] & "'")
Me.Busmonitor5 = DLookup("Busmonitor", "tbl_schoolbus", "tbl_schoolbus.busNo ='" & Me.[Busline5] & "'")
Exit_Report:
Exit Sub
Err_Report:
MsgBox Err.Description
Resume Exit_Report
End Sub
这个语句读出的是错误的 |
|