我有一个需要使用的数据库,但它有一些我必须修复的错误。由于我不是 MS-Access 方面的专家,所以我无法弄清楚错误在哪里。
第一个错误
Run-time. Could not find field '| 1' to which reference is made in the expression.
按下打印按钮时抛出。
打开调试,我发现了这段代码:
Private Sub Pulsante40_Click()
If Me!Campo51 = False Then
Select Case [schede]![S_Stampa_Ordini].[ordinamento]
Case 1
DoCmd.OpenReport "Stampa Ordini BY DATA", , , " (DATA_AGG Between #" & Format$(Me.[Dal], "mm/dd/yyyy") & "# And #" & Format$(Me.[Al], "mm/dd/yyyy") & " 23:59#) AND Tipo = """ & Me.TipoL & """"
Case 2
DoCmd.OpenReport "Stampa Ordini BY CLIENTE", , , " (DATA_AGG Between #" & Format$(Me.[Dal], "mm/dd/yyyy") & "# And #" & Format$(Me.[Al], "mm/dd/yyyy") & " 23:59#) AND Tipo = """ & Me.TipoL & """"
Case 3
DoCmd.OpenReport "Stampa Ordini BY LAVORAZION", , , " (DATA_AGG Between #" & Format$(Me.[Dal], "mm/dd/yyyy") & "# And #" & Format$(Me.[Al], "mm/dd/yyyy") & " 23:59#) AND Tipo = """ & Me.TipoL & """"
Case 4
DoCmd.OpenReport "Stampa Ordini BY DATA_CONS", , , " (DATA_AGG Between #" & Format$(Me.[Dal], "mm/dd/yyyy") & "# And #" & Format$(Me.[Al], "mm/dd/yyyy") & " 23:59#) AND Tipo = """ & Me.TipoL & """"
End Select
FDipendente = 0
Else
DoCmd.OpenForm "FiltroStampa", , , , , A_DIALOG
End If
End Sub
它给了我在线错误:
Select Case [schede]![S_Stampa_Ordini].[ordinamento]
第二个错误
Compile Error, could not find the method or data member
当我打开面具分钟并选择时抛出
Legno, or Lavorazione Ext
代码:
Private Sub Tipo_AfterUpdate()
Select Case Me.Tipo
Case "C"
Me.[SSMin-In].scheda.testo0.Caption = "Lavorazione:"
Case "L"
Me.[SSMin-In].scheda.testo0.Caption = "Cod.Prev.:"
Case "E"
Me.[SSMin-In].scheda.testo0.Caption = "Cod.Prev.:"
End Select
End Sub
它给了我在线错误:
私有子 Tipo_AfterUpdate()
这几天我一直在尝试解决数据库问题,或者至少开始学习视觉基础来理解一些东西。不幸的是我只知道java,我的同事帮不了我。提前感谢您的回答,如果我不清楚或没有提供足够的信息,我深表歉意。