gpt4 book ai didi

ms-access - 微软 Access -vba : Compile Error: expected: =

转载 作者:行者123 更新时间:2023-12-03 02:14:41 26 4
gpt4 key购买 nike

我有一个子例程如下

Public Sub updateStagesTable(sName As String, percentageValue As Double)
stageName = "'" & sName & "'"
sSQL = "INSERT INTO StagesT ([Stage Name], [Stage Value In Percentage]) VALUES (" & stageName & "," & percentageValue & ");"
DoCmd.SetWarnings False
DoCmd.RunSQL sSQL
End Sub

我从另一个子例程中调用它,如下所示

economy = 3.53
updateStagesTable ("Economy", economy)

但是我收到这个编译错误

Compile Error: expected: =

我不明白我在这里做错了什么。请帮忙。

最佳答案

updateStagesTable ("Economy", economy)

应该是

updateStagesTable "Economy", economy

没有括号

查看相关:Unexpected results from typename

关于ms-access - 微软 Access -vba : Compile Error: expected: =,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31329829/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com