语法-424对象在代码线上所需的错误

发布于 2025-02-12 02:29:16 字数 288 浏览 2 评论 0原文

我一直在以下代码行上获得424:对象reuqired错误:

 If rstCurrent.Fields(1).Value Is Not Null Then
 MaxDate = rstCurrent.Fields(1)
 End If

这是一个问题的语法。为什么它会在它之前拿起线:

If rstCurrent.Fields.Count > 0 Then

End if

给我正确的表(8)的菲尔德数量,但在上一个错误中出错了?

I keep getting a 424: Object Reuqired error on the following line of code:

 If rstCurrent.Fields(1).Value Is Not Null Then
 MaxDate = rstCurrent.Fields(1)
 End If

Is the syntax for this an issue. Why would it pick up the line before it:

If rstCurrent.Fields.Count > 0 Then

End if

and give me the correct number of feilds for the table (8) but error out on the previous?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挽你眉间 2025-02-19 02:29:16

使用VBA语法:

If Not IsNull(rstCurrent.Fields(1).Value) Then
    MaxDate = rstCurrent.Fields(1).Value
End If

Use VBA syntax:

If Not IsNull(rstCurrent.Fields(1).Value) Then
    MaxDate = rstCurrent.Fields(1).Value
End If
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文