访问表中的VB脚本 [英] VB Scripts in Access Tables

查看:61
本文介绍了访问表中的VB脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有一个名为姓名的字段在Access表联系信息中,

字段包含VBScript ...


功能主要(rstFields)

Main = rstFields.Item(" FirstName")。值

结束函数


1.如何将记录集传递到此字段?

2.如何获取返回值?


谢谢,


Adam

If I had a field called "Name" in an Access table "Contact Info", and the
field contained VBScript...

Function Main(rstFields)
Main = rstFields.Item("FirstName").Value
End Function

1. How do I pass a recordset into this field?
2. How do I capture the return value?

Thanks,

Adam

推荐答案

Adam Turner通过AccessMonster.com写道:
Adam Turner via AccessMonster.com wrote:
如果我有一个名为Name的字段


坏主意,姓名是一个保留字。

在Access表中联系信息,


再次,表名中的空格将在以后绊倒你。 />

字段包含VBScript ...


表格中没有VBScript,这可以单独存在于模块中

或表单背后的代码。


函数Main(rstFields)
Main = rstFields.Item(" FirstName")。值
结束函数

1.如何将记录集传递到此字段?
2.如何捕获返回值?
If I had a field called "Name"
Bad idea, "Name" is a reserved word.
in an Access table "Contact Info",
again, spaces in table names will trip you up later on.
and the
field contained VBScript...
There is no VBScript in tables, this goes in modules either on their own
or code behind a form.

Function Main(rstFields)
Main = rstFields.Item("FirstName").Value
End Function

1. How do I pass a recordset into this field?
2. How do I capture the return value?




给定以上,我不知道你要去哪里。


我建议你上一本关于Access的初学者书并学习基础知识
在发布之前
。这不是了解桌子等等的地方。



Given the above, I''ve no idea where you''re going with this.

I suggest you get a beginner''s book on Access and learn the fundimentals
before posting here. This isn''t the place to learn what a table is, etc.


Trevor Best写道:
Trevor Best wrote:
如果我有一个名为Name的字段
If I had a field called "Name"



错误的想法,名称是一个保留字。



Bad idea, "Name" is a reserved word.

在Access表格中联系信息,
in an Access table "Contact Info",



再次,表名中的空格会让你以后绊倒on。



again, spaces in table names will trip you up later on.


字段包含VBScript ...
and the
field contained VBScript...



表中没有VBScript,这在模块中也是如此单独使用
或表单后面的代码。



There is no VBScript in tables, this goes in modules either on their own
or code behind a form.

函数Main(rstFields)
Main = rstFields.Item(" FirstName")。Value
结束功能

1.如何将记录集传递到此字段?
2.如何捕获返回值?
Function Main(rstFields)
Main = rstFields.Item("FirstName").Value
End Function

1. How do I pass a recordset into this field?
2. How do I capture the return value?



给定以上,我不知道你要去哪里。

我建议你在发布之前先获得一本关于Access的初学者书籍并学习基础知识。这不是了解桌子等等的地方。



Given the above, I''ve no idea where you''re going with this.

I suggest you get a beginner''s book on Access and learn the fundimentals
before posting here. This isn''t the place to learn what a table is, etc.




感谢礼仪建议,但我正在寻找更多的编程建议。


是否有人熟悉访问表中的VBScript?


如果您认为这是不可能的,请不要回复。


谢谢,


Adam

-

通过AccessMonster.com发布消息
http://www.accessmonster.com/Uwe /For...ccess/200510/1


" Adam Turner via AccessMonster.com" < u14766 @乌韦>在消息中写道

news:55b13d882d2da @ uwe ...
"Adam Turner via AccessMonster.com" <u14766@uwe> wrote in message
news:55b13d882d2da@uwe...
Trevor Best写道:
Trevor Best wrote:
如果我有名为名称的字段
If I had a field called "Name"



错误的想法,名称是一个保留字。



Bad idea, "Name" is a reserved word.

在Access表格中联系信息,
in an Access table "Contact Info",



再次,表名中的空格会让你以后绊倒on。



again, spaces in table names will trip you up later on.


字段包含VBScript ...
and the
field contained VBScript...



表中没有VBScript,这在模块中也是如此单独使用
或表单后面的代码。



There is no VBScript in tables, this goes in modules either on their own
or code behind a form.

函数Main(rstFields)
Main = rstFields.Item(" FirstName")。Value
结束功能

1.如何将记录集传递到此字段?
2.如何捕获返回值?
Function Main(rstFields)
Main = rstFields.Item("FirstName").Value
End Function

1. How do I pass a recordset into this field?
2. How do I capture the return value?



给定以上,我不知道你要去哪里。

我建议你在发布之前先获得一本关于Access的初学者书籍并学习基础知识。这不是了解桌子等等的地方。



Given the above, I''ve no idea where you''re going with this.

I suggest you get a beginner''s book on Access and learn the fundimentals
before posting here. This isn''t the place to learn what a table is, etc.



感谢礼仪建议,但我正在寻找更多的编程建议。

是任何熟悉访问表中的VBScript的人?

如果您认为这是不可能的,请不要回复。

谢谢,

Adam



Thanks for etiquette advice but I was looking for more programming advice.

Is anyone familiar with VBScript in Access Tables?

Please do not reply if you believe this isn''t possible.

Thanks,

Adam




你不需要做太多的谷歌搜索,发现Trevor既知识渊博又有帮助,并且可能花了很多年的时间写作

vb / vbscript / vba。我相信他真的很乐意帮忙 -

也适合我。但是,我会认为特雷弗的观点是,我不能看到你在这个功能中使用的b $ b,或者问题是什么。为什么

不要尝试重新措辞,让我们知道你是否几乎全新的这一切。当然......和字段包含VBScript ......

对我来说没有多大意义。




You don''t need to do much Googling to find out that Trevor is both
knowledgeable and helpful and has probably spent many years writing
vb/vbscript/vba. I am sure he would be genuinely happy to help out - that
goes for me too. However, I would second Trevor''s opinion that I can''t see
where you''re going with that function, or quite what the question is. Why
not try re-phrasing it and let us know whether you are pretty much new to
all of this. Certainly the bit "...and the field contained VBScript..."
does not make much sense to me.



这篇关于访问表中的VB脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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