|
不明白以下這段代碼在我的机上沒有問題,到了別的机上就會出現執行階段錯誤’-2146500594(800f000e)’:’form’方法(‘-subform物件’)失敗
'設置子窗体和品名組合框數據來源
Private Sub Form_Load()
Me.frm_packingdailysub.Form.RecordSource = "SELECT *FROM tblpackingdaily"
Me.txtpm.RowSource = "SELECT tblpackingdaily.品名 FROM tblpackingdaily GROUP BY tblpackingdaily.品名 ORDER BY tblpackingdaily.品名;"
End Sub
然後我把它改成以下代碼后:
forms![frm_packingdaily]![frm_packingdailysub].Form.RecordSource = "SELECT *FROM tblpackingdaily"’這句還是出現問題
forms![frm_packingdaily]!txtpm.RowSource = "SELECT tblpackingdaily.品名 FROM tblpackingdaily GROUP BY tblpackingdaily.品名 ORDER BY tblpackingdaily.品名;"’這句可以用各位高手幫忙看一看,謝謝! |
|