本文介绍了控制源中的三种可能性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...


我在MS Access 2000中工作,我有一个字段,根据其他字段的值,我希望该字段返回一个特定的字。理想情况下,我希望声明在控件源中,但我已经开始尝试在VB中进行编码。看来我的问题在于在...之间。我的代码在第三段中的陈述。我在下面发布了我的代码。我没有在论坛上找到答案,所以任何帮助将不胜感激。我相信这不是解决这个问题的最佳方式..........


如果([ScoreCard查询]![1/3]前臂T评分]或[记分卡查询]![脊柱T评分]或[记分卡查询]![总髋部T评分]<" -2.5)然后Me.BoneDensityResult =骨质疏松症


If([ScoreCard Query]![1/3 Forearm T score]或[ScoreCard Query]![Ap spine T Score]或[ScoreCard Query]![Total Hip T Score] -1.0"和-2.5")然后Me.BoneDensityResult =Osteopenia


如果([ScoreCard查询]![1/3前臂T得分]或[ ScoreCard Query]![Ap spine T Score]或[ScoreCard Query]![Total Hip T Score]>1.0)然后Me.BoneDensityResult =Normal


EndIF


结束Sub

解决方案



Hi...

I am working in MS Access 2000 and I have a field where depending on the values of other fields, I would like the field to return a particular word. Ideally, I would like the statement to be in the control source, but I have moved to trying to have the coding in VB. It seems my problem is with the "between" statement in my code in the third paragraph. I have posted my code below. I did not find an answer on the forum, so any help would be appreciated. I am sure this is not the optimal way to go about this..........


If ([ScoreCard Query]![1/3 Forearm T score] Or [ScoreCard Query]![Ap spine T Score] Or [ScoreCard Query]![Total Hip T Score] < "-2.5") Then Me.BoneDensityResult = "Osteoperosis"

If ([ScoreCard Query]![1/3 Forearm T score] Or [ScoreCard Query]![Ap spine T Score] Or [ScoreCard Query]![Total Hip T Score] between "-1.0" and "-2.5") Then Me.BoneDensityResult = "Osteopenia"

If ([ScoreCard Query]![1/3 Forearm T score] Or [ScoreCard Query]![Ap spine T Score] Or [ScoreCard Query]![Total Hip T Score] > "1.0") Then Me.BoneDensityResult = "Normal"

EndIF

End Sub

解决方案




这篇关于控制源中的三种可能性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-03 22:49
查看更多