我需要帮助来验证未绑定文本框的值 [英] I need help in verifying a value of an unbound textbox
问题描述
嗨专家,
我想知道你是否可以帮助我。
AccumulationSum是一个计算总和的未绑定文本框束缚场积累。控制源是= Sum([Accumulation]]
当我尝试使用下面的代码验证值时,没有任何反应。
Private Sub AccumulationSum_AfterUpdate()
如果Me.AccumulationSum> =" 21.0"然后
MsgBox积累已达到最大值!
结束如果
结束子
任何人都可以告诉我我做错了什么并帮助我解决问题。
谢谢,
恩里克
嗨专家,
我想知道你是否可以帮助我。
AccumulationSum是一个未绑定的文本框,用于计算绑定字段累积的总和。控制源是= Sum([Accumulation]]
当我尝试使用下面的代码验证值时,没有任何反应。
Private Sub AccumulationSum_AfterUpdate()
如果Me.AccumulationSum> =" 21.0"然后
MsgBox积累已达到最大值!
结束如果
结束子
任何人都可以告诉我我做错了什么并帮助我解决问题。
谢谢,
恩里克
您将数字格式化为文本,方法是将其括在引号中。
更改此:
如果Me.AccumulationSum> = " 21.0"然后
To:
如果Me.AccumulationSum> = 21.0那么
您将数字格式化为文本,方法是将其括在引号中。
更改此:
如果Me.AccumulationSum> =" 21.0"然后
要:
如果Me.AccumulationSum> = 21.0那么
谢谢PDB (puppydogbuddy)但我刚尝试过..但是没有提起消息框。 :(
谢谢PDB(puppydogbuddy),但我刚尝试过..还没有提起消息框。:(
好的,检查你的表并确认Accumlation是数字数据类型。
改变这个:
控制源是= Sum([Accumulation]]
To:
控制源是= Sum([Accumulation])
Hi experts,
I was wondering if you could help me out here.
AccumulationSum is an unbound textbox that calculates the sum of bound field Accumulation. The control source is =Sum([Accumulation)]
Whe I try to verify the value using the code below, nothing happens.
Private Sub AccumulationSum_AfterUpdate()
If Me.AccumulationSum >= "21.0" Then
MsgBox "Accumulation has reached its maximum!"
End If
End Sub
Can anyone pease tell me what I''m doing wrong and help me with a solution.
Thanks,
Enrique
Hi experts,
I was wondering if you could help me out here.
AccumulationSum is an unbound textbox that calculates the sum of bound field Accumulation. The control source is =Sum([Accumulation)]
Whe I try to verify the value using the code below, nothing happens.
Private Sub AccumulationSum_AfterUpdate()
If Me.AccumulationSum >= "21.0" Then
MsgBox "Accumulation has reached its maximum!"
End If
End Sub
Can anyone pease tell me what I''m doing wrong and help me with a solution.
Thanks,
EnriqueYou are formatting the number as text by enclosing it in quotes..
Change this:
If Me.AccumulationSum >= "21.0" Then
To:
If Me.AccumulationSum >= 21.0 Then
You are formatting the number as text by enclosing it in quotes..
Change this:
If Me.AccumulationSum >= "21.0" Then
To:
If Me.AccumulationSum >= 21.0 ThenThanks PDB(puppydogbuddy) but I just tried it..still doesn''t bring up the message box. :(
Thanks PDB(puppydogbuddy) but I just tried it..still doesn''t bring up the message box. :(Ok, check your table and verfy that Accumlation is numeric data type.
Change this:
The control source is =Sum([Accumulation)]
To:
The control source is =Sum([Accumulation])
这篇关于我需要帮助来验证未绑定文本框的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!