我得到這個錯誤在Microsoft Access:運行時錯誤424 ..對象所需
運行時錯誤424對象所需
而下面是我在後端使用VBA代碼
VBA代碼
Private Sub Command87_Click()
If Me.phase <> "" Then
Me.lst_caseItems.RowSource = " " & _
"SELECT tbl_master.fld_masterID, " & _
"tbl_master.fld_masterActionNo AS ActionNumber, " & _
"tbl_master.fld_masterStudyActionNo AS StudyActionNo, tbl_master.fld_masterIssuedTo," & _
"tbl_master.fld_masterRev AS Rev, tbl_phases.fld_phase AS Phase, tbl_studies.fld_study AS Study, " & _
"FROM ((tbl_master LEFT JOIN tbl_studies ON tbl_master.fld_studyID = ' " & tbl_studies.fld_studyID & " ') LEFT JOIN tbl_phases ON tbl_master.fld_phaseID = ' " & tbl_phases.fld_phaseID & " ') LEFT JOIN tbl_locations ON tbl_master.fld_locationID = ' " & tbl_locations.fld_locationID & " ';"
End If
End Sub
你肯定'phase'變量和'lst_caseItems'are在'Command87_Click(的情況下可用)'?使用調試器斷點來查看執行代碼時可用的內容。 P.S .: _backend_和_codebehind_是不同的術語,在這種情況下它是代碼隱藏的。 P.P.S .: 87按鈕? 0_o –