我在vba收到此消息,有人可以分析这个问题吗?我必须完成这项工作,但是这些错误显示出来很困难。
Private Sub ListTarefas_DblClick()
Dim idtarefas As Integer
Dim func As Integer
Set rst = New ADODB.Recordset
ShowEquipa
Form_Projetos.List0.RowSource = ""
idtarefas = ListTarefas.Column(0, ListTarefas.ListIndex)
rst.Open "SELECT * FROM Equipas WHERE [ID-Tarefa] LIKE '" & idtarefa & "' " & _
";", CurrentProject.Connection, adOpenDynamic, adLockOptimistic
With Form_Projetos
.List0.RowSourceType = "Value List"
Do Until rst.EOF
func = rst.Fields("ID-Func").value
.List0.AddItem (func)
rst.MoveNext
Loop
End With
rst.Close
End Sub
答案 0 :(得分:1)
你错过了一个论点,而不是
Private Sub ListTarefas_DblClick()
但是
Private Sub ListTarefas_DblClick(Cancel As Integer)
错误消息是缺少参数的典型信息。
当Access接受SQL语句作为行源时,我不明白为什么要花这么长时间。