MS Access:在表单中使用IIf函数 [英] MS Access: Using the IIf Function in a form

查看:151
本文介绍了MS Access:在表单中使用IIf函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在设计一个表格,需要知道如何获得一个复选框(PASS)

当文本框中的数据时自动更新( MARK),以相同的

形式,是> = 24。

使用复选框的事件对话框,AfterUpdate,我有

尝试:

IIf([MARK]> = 24,True,False)

另外:

IIf([MARK]> ; = 24,1,0)

另外:

IIf([MARK]> = 24,是,否)


虽然我没有收到任何错误消息,但似乎没有任何效果。

有什么建议吗?

解决方案

< BLOCKQUOTE>"特里" < TC ***** @ merseymail.com> schrieb im Newsbeitrag

新闻:38 ************************** @ posting.google.c om ...

你好,
我正在设计一个表格,需要知道如何获得一个复选框(PASS),以便在文本框(MARK)中的数据时自动更新,以相同的形式,是> = 24.
使用复选框的事件对话框,AfterUpdate,我已经尝试过:
IIf([MARK]> = 24,正确,错误)
另外:
IIf([MARK]> = 24,1,0)
另外:
IIf([MARK]> = 24 ,是,没有)

虽然我没有收到任何错误消息,但似乎没有任何效果。
有什么建议吗?




嗨Terry,


使用TextBox的After Update Edvent设置PASS

类似于:


IIf ... Me.PASS = True


Viel Erfolg,

Michael


你需要这个用于更新和OnCurrent of Form的类似子。

这是无关紧要的用你键入的复选框。这应该是

锁定


私有子MARK_AfterUpdate()


如果MARK> =那么

通行证=真

否则

通行证=错误

结束如果


结束分


菲尔

" Terry" < TC ***** @ merseymail.com>在消息中写道

news:38 ************************** @ posting.google.c om ...

你好,
我正在设计一个表格,需要知道如何获得一个复选框(PASS),以便在文本框(MARK)中的数据时自动更新,以相同的形式,是> = 24.
使用复选框的事件对话框,AfterUpdate,我已经尝试过:
IIf([MARK]> = 24,正确,错误)
另外:
IIf([MARK]> = 24,1,0)
另外:
IIf([MARK]> = 24 ,是,没有)

虽然我没有收到任何错误消息,但似乎没有任何效果。
有什么建议吗?



我将sub放入Mark控制框中的Afterupdate Event并且

虽然我没有收到任何错误消息....没有任何反应。

我因为我不知道,所以不能把子潜入表格的OnCurrent中。

如何做到这一点...确实尝试过帮助但发现它太复杂了

明白了。是否有一个简单的解释如何做到这一点?


特里


" Phil Stanton" < pH值** @ stantonfamily.co.uk>在消息新闻中写道:< 3f *********************** @ mercury.nildram.ne t> ...

你需要这个用于更新和OnCurrent of Form的类似子。
这与你键入复选框的内容无关。这应该是
锁定

私人子MARK_AfterUpdate()

如果MARK> =然后
Pass = True
Else
Pass = False
结束如果

End Sub

Phil

" Terry" < TC ***** @ merseymail.com>在消息中写道
新闻:38 ************************** @ posting.google.c om ...

你好,
我正在设计一个表格并且需要知道如何获得一个复选框(PASS)以便在文本框(MARK)中的数据时自动更新,在同一
form,是> = 24.
使用复选框的事件对话框,AfterUpdate,我已经尝试过:
IIf([MARK]> = 24,True ,错误)
另外:
IIf([MARK]> = 24,1,0)
另外:
IIf([MARK]> = 24,是和;,没有)

虽然我没有收到任何错误消息,但似乎没有任何效果。
有什么建议吗?



Hello,
I am designing a form and need to know how to get a Check Box(PASS)to
automatically update when the data in a Text Box (MARK), in the same
form, is >=24.
Using the Event dialogue box for the Check Box, AfterUpdate, I have
tried:
IIf([MARK]>=24,True,False)
Also:
IIf([MARK]>=24,1,0)
Also:
IIf([MARK]>=24,"Yes","No")

Although I get no error messages, nothing seems to work.
Any suggestions?

解决方案

"Terry" <tc*****@merseymail.com> schrieb im Newsbeitrag
news:38**************************@posting.google.c om...

Hello,
I am designing a form and need to know how to get a Check Box(PASS)to
automatically update when the data in a Text Box (MARK), in the same
form, is >=24.
Using the Event dialogue box for the Check Box, AfterUpdate, I have
tried:
IIf([MARK]>=24,True,False)
Also:
IIf([MARK]>=24,1,0)
Also:
IIf([MARK]>=24,"Yes","No")

Although I get no error messages, nothing seems to work.
Any suggestions?



Hi Terry,

Use the After Update Edvent of the TextBox to set PASS
Something like:

IIf ... Me.PASS=True

Viel Erfolg,
Michael


You need this for the update and a similar sub for OnCurrent of Form.
It''s nothing to do with what you key into the checkbox. This should be
locked anyway

Private Sub MARK_AfterUpdate()

If MARK >= Then
Pass = True
Else
Pass = False
End If

End Sub

Phil
"Terry" <tc*****@merseymail.com> wrote in message
news:38**************************@posting.google.c om...

Hello,
I am designing a form and need to know how to get a Check Box(PASS)to
automatically update when the data in a Text Box (MARK), in the same
form, is >=24.
Using the Event dialogue box for the Check Box, AfterUpdate, I have
tried:
IIf([MARK]>=24,True,False)
Also:
IIf([MARK]>=24,1,0)
Also:
IIf([MARK]>=24,"Yes","No")

Although I get no error messages, nothing seems to work.
Any suggestions?



I put the sub into Afterupdate Event in the Mark control box and
although I get no error messages....nothing happens.
I couldn''t put the sub in the OnCurrent of the form as I don''t know
how to do this...did try help but found it much too complex to
understand. Is there an easy explanation of how to do this?

Terry

"Phil Stanton" <ph**@stantonfamily.co.uk> wrote in message news:<3f***********************@mercury.nildram.ne t>...

You need this for the update and a similar sub for OnCurrent of Form.
It''s nothing to do with what you key into the checkbox. This should be
locked anyway

Private Sub MARK_AfterUpdate()

If MARK >= Then
Pass = True
Else
Pass = False
End If

End Sub

Phil
"Terry" <tc*****@merseymail.com> wrote in message
news:38**************************@posting.google.c om...

Hello,
I am designing a form and need to know how to get a Check Box(PASS)to
automatically update when the data in a Text Box (MARK), in the same
form, is >=24.
Using the Event dialogue box for the Check Box, AfterUpdate, I have
tried:
IIf([MARK]>=24,True,False)
Also:
IIf([MARK]>=24,1,0)
Also:
IIf([MARK]>=24,"Yes","No")

Although I get no error messages, nothing seems to work.
Any suggestions?



这篇关于MS Access:在表单中使用IIf函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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