I am trying to update an Access database with a vb script by putting a soccer scoreline into a column dependent on when a goal is scored.
因此,我有一个表格,有一栏。
matchID 1 2 3 4.... 89 90
我写了这封信。
Dim rst As DAO.Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tblScoreLinesByMinute", dbOpenTable)
Let us say there was a goal scored by the home team in the 3rd minute
I have captured this with a variable numTime = 3
and created a variable strScoreline = 10
.
I wish to update the table something like
rst![numTime] = strScoreline
但是,如果我尝试这一或“CStr(numtime)
,则我会遇到一个错误,即“本收集中没有发现的情况”。 硬编码
rst![3] =strScoreline
工作
我也渴望将其他各栏划入相关的记分线。 让我们说,离队在88分钟平等。 下面,我所看到的是这一特殊匹配的行文,显示0栏1 2、3栏至87栏、10栏88-90 11
如果有更简单的方法,我也可以使用ms。