将必填字段设置为否 - Excel VBA访问 [英] Setting Required Field to No - Excel VBA to Access

查看:207
本文介绍了将必填字段设置为否 - Excel VBA访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 - 我正在使用Excel编写代码,将数据从Excel电子表格发送到Access表。我从Excel创建表。如何制作必需的Access中的字段否在Excel中使用VBA代码?我正在使用Access 2016.


感谢您的帮助。


Patty

解决方案

嗨帕蒂。


从你的问题开始,对于任何人来说真的很少。


有很多方法去皮猫在不知道你是如何接近这个特定问题的情况下,我们不能轻易回应。我想到了两种方法(SQL和对象模型)但我们不知道你是否正在使用它们。您是否正在使用应用程序自动化或尝试创建基于Excel的专用解决方案。如果没有某种基本框架,我们就会隐藏起来。


我建议您发布代码的相关部分,以便我们可以了解我们的内容实际上正在处理。


嗨 - 抱歉缺乏上下文。我们正在尝试在Excel中设置Access。我们希望控制属性必需无论是对还是对。这样,如果没有可用数据,则该字段为空是可以的。这是我们到目前为止的一些代码。 '的最后一步似乎是2016年之前使用Access版本的代码。我们正在寻找新的语法。

展开 | 选择 | 换行 | 行号


< blockquote>我认为默认的必需属性设置为false。


hi - i''m working in Excel writing code to send data from an Excel spreadsheet to an Access table. I create the table from Excel. How do I make the "Required" field in Access "No" using VBA code in Excel? I am using Access 2016.

Thanks for your help.

Patty

解决方案

Hi Patty.

There''s really very little for anyone to go on from your question.

There are many ways to skin a cat. Without knowing how you''re approaching this particular issue we can''t easily respond. Two approaches come to mind (SQL & Object model) but we don''t know if you''re using either. Are you using Application Automation or trying to create a specifically Excel-based solution. Without some sort of basic framework we''re on a hiding to nothing.

I suggest you post the relevant portion of your code so that we can get an idea of what we''re actually dealing with.


Hi - sorry for the lack of context. We are trying to set up a table in Access from Excel. We want to control the property "Required" to No or False. This way if no data is available, it''s ok that the field is blank. Here is some of the code we have so far. The last step with '' seems to be the code using Access versions before 2016. We are looking for the new syntax.

Expand|Select|Wrap|Line Numbers


I believe the default Required property setting is false.


这篇关于将必填字段设置为否 - Excel VBA访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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