我必须从word 2010 in vba
中的访问中选择一些行,现在我想选择一些东西但是我收到一个错误,说我的选择错了你能帮帮我吗?
Private Sub CommandButton1_Click()
Dim jahr As String
Dim LfdNummer As Integer
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSql As String
jahr = TextBox1
LfdNummer = TextBox2
Private Sub CommandButton1_Click()
Dim jahr As String
Dim LfdNummer As Integer
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSql As String
jahr = TextBox1
LfdNummer = TextBox2
Set db = CreateObject("DAO.DBEngine.120").OpenDatabase("C:\User/012886\Documents\Hendrik\trilux\EMV\Beispiel_EMV.accdb")
' Daten lesen und weiterverwenden -> über Recordset
Set rs = db.OpenRecordset("SELECT * FROM ITZ-EMV-Messungen")
Do While Not rs.EOF
rs.MoveNext
Loop
rs.Close
db.Close
End Sub
答案 0 :(得分:0)
尝试包围:[ITZ-EMV-Messungen]我认为它是破折号。