自定义功能秒() [英] Custom function Second()

查看:93
本文介绍了自定义功能秒()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Experts,


我想在VB中为Access创建自定义函数Second()。此函数应返回字段中的第二个值,如函数First给出的第一个值。


这个函数应该像Access中的集成函数First()和Last()一样。


对于像你这样的专家,这应该是'我希望很难。任何人都可以帮我解决这个功能的代码吗?


感谢您的时间! Sander

解决方案

亲爱的,


我认为在Access中有这样的功能!


秒(MyTime)


小心我的朋友!


;)


< blockquote>


亲爱的,


我认为在Access中有这样的功能!


秒(MyTime)


小心我的朋友!


;)



哈,谢谢PEB!但是我想在查询表达式中使用函数来表示非时间字段。根据First函数的代码,我想创建第二,第三,第四等功能..


你能帮帮我吗?再次感谢Sander


实际上在查询First(Expression)或Last(Expression)中,Sum和Count()在Basic中都不起作用而且没有构建还有!


它们是MS Access使用的SQL标准的一部分


我不知道如何添加保留字和命令在MS Access SQL语言中!


Reelly VB函数可以帮到你,但首先你应该确定你的参数!


函数在VB中你想要的:


Dcount(" Field"," Table"," Criteria")


为我们提供参数功能!


:)


Hello Experts,

I would like to make a custom function Second() for Access in VB. This function should return the second value from a field like the function First gives the first value.

This function should be like the integrated function First() and Last() in Access.

For an expert like you this shouldn''t be to hard I hope.. Can anyone help me out with the code for this function?

Thanks for your time! Sander

解决方案

Dear,

I think that in Access there is a function like this!

Second(MyTime)

Take care my friend!

;)


Dear,

I think that in Access there is a function like this!

Second(MyTime)

Take care my friend!

;)

Ha, thanks PEB! But I want to use the function in a query-expression for a non-time field. Based on the code for the First function I would like to create Second, Third, Fourth, etc functions..

Could you help me out? Thanks again, Sander


In fact in the queries First(Expression) or Last(Expression), also Sum and Count() aren''t function in Basic and aren''t build in also!

They are part of the SQL standard used by MS Access

I don''t know how to add reserved words and commands in MS Access SQL language!

Reelly a VB function can help you, but first you should determine your parameters!

Function in VB like you want:

Dcount("Field", "Table","Criteria")

So supply us parameters for your function!

:)


这篇关于自定义功能秒()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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