已安装的新办公室 - 功能在vba中工作,但其格式在访问时不同 [英] Installed new office - functions work in vba but format of it different in access que

查看:164
本文介绍了已安装的新办公室 - 功能在vba中工作,但其格式在访问时不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在新电脑上安装了Office 365。我的MS Access应用程序现在出现了函数内置查询的问题。相同的函数在VBA代码中完美运行,但在查询中不起作用。


示例:VBA中的访问提供的提示与格式函数的查询外观如下:


VBA:


格式(表达式,[格式],[FirstDayOfWeek为VbDayOfWeek = vbSunday],[FirstWeekOfYear为VbFirstWeekOfYear = vbFirstJan1])


查询:


格式(表达式[格式] [firstdayofweek] [firstdayofyear])


注意通常情况下,选项之间只有空格而不是逗号(对于查询)。然后该功能不起作用。尝试完成该函数会出现错误:您输入的表达式包含无效语法。你已经输入了一个没有操作员的操作数。


我知道我之前在新机器上安装了新的安装,但是不记得我在哪里找到了解决方案。请问有什么想法吗?


谢谢!!

I installed office 365 on a new pc. My MS Access applications now have issues with functions built-in queries. The same functions work perfectly in the VBA code but not in queries.

Example: The hints provided by access in VBA versus the query looks as follows for the format function:

VBA:

format(Expression, [Format], [FirstDayOfWeek As VbDayOfWeek = vbSunday], [FirstWeekOfYear As VbFirstWeekOfYear = vbFirstJan1])

In a query:

format(expression [format] [firstdayofweek] [firstdayofyear])

Note that there are only spaces between the options and not commas as would normally be (for the query). The function then does not work. Trying to complete the function gives the error: The expression you entered contains invalid syntax. You have entered an operand without an operator.

I know I had this same issue previously with a new install on a new machine but cannot remember where I found the solution. Any ideas, please?

Thanks!!

推荐答案

从试图在网上找到解决方案,似乎引用可能是问题?然而,VBA代码有效。 MS Access查询使用哪些参考?是否可能尝试解决错误?
From trying to find solutions on the web, it seems that references might be the issue? The VBA code however works. What references do the MS Access queries use? Is there not possibly an error there that I can try to resolve?


已解决 - 未在区域设置中设置分隔符。
SOLVED - Was a separator not set in regional settings.


这篇关于已安装的新办公室 - 功能在vba中工作,但其格式在访问时不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆