访问复选框的值以打开表单 [英] Access the value of checkbox in order to open the form

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

问题描述

大家好,


Uptil现在我从这个论坛得到了很多帮助。我真的很感激你的帮助。非常感谢你。


我被困在一点,我的数据库看起来像这样。

表:任务(EmployeeId,StartTime,EndTime,Duration, CheckE ndTime)

查询:TasksQuery(EmployeeId,EndTime,Duration,Check EndTime)


请注意:她的CheckEndTime只是Checkbox字段。


表格:表格1


按钮:Command17


现在,流程是这样的。当用户没有输入EndTime(即只输入了starttime)时,Checkbox将保持未选中状态。

它将转移到TasksQuery。


因此,当用户点击Command17时,应检查查询以查看登录用户是否存在,如果是,则应显示消息,否则应打开表单。


我尝试了几种逻辑,但它似乎它对复选框字段不起作用。它总是显示null或0值,具体取决于不同的逻辑。


(添加我的复选框是2状态复选框)


我可以做些什么来检查字段是否被检查或者查询中是否存在employeeid。


此外,查询应该刷新。

任何帮助将不胜感激。


请建议。

Hi guys,

Uptil now I got plenty of helps from this forum. I really appreciate your wonderful help. Thank you so much.

I am stuck at one point, my database looks like this.
Table: Tasks(EmployeeId,StartTime,EndTime,Duration,CheckE ndTime)
Query:TasksQuery(EmployeeId,EndTime,Duration,Check EndTime)

Please Note: Her CheckEndTime is nothing but Checkbox field.

Form : Form1

Button: Command17

Now, the flow is like this. When the user have not entered EndTime(i.e. Only starttime has been entered), then the Checkbox will remain unchecked.
And it will move to TasksQuery.

So, When the user clicks on "Command17" the query should be checked to see if the logged in user is present there, if yes than message should be displayed, else the form should be opened.

I tried several logics, but it seems it doesnot work well with checkbox field. It is always display null or 0 value depending upon different logic''s.

(To add my checkbox is a 2 state checkbox)

What can I do to check if the field is checked or the employeeid is present in the Query or not.

Also, the query should get refreshed.
Any help will be appreciated.

Please advice.

推荐答案

问题,为什么你有一个复选框?它似乎是冗余信息,因为您可以简单地检查是否填写了结束时间。

Question, why are you having a checkbox? It seems to be redundant information, as you could simply check if the endtime is filled out.

展开 | 选择 < span class =codeDivider> | Wrap | 行号


Hi Smiley,


其实背后的原因具有这种冗余的是,当我尝试检查表中的复选框时是否检查它,它只是显示真和真。选中一个带有登录用户employeeid的复选框。它没有检查整个表格。所以,我想创建查询所以它只需要检查一次。但现在它甚至没有这样做。


此外,道歉但你的代码不起作用,因为我需要比较Logged in EmployeeId字段。

Hi Smiley,

Actually the reason behind having this redundancy is, when I tried checking the checkbox in the table if it is checked or not, it was simply displaying "True" incase one checkbox with the logged in user employeeid is checked. It was not checking the full table. So, I thought to create query so it have to only check for one time. But now it is not even doing that.

Also, apologies but your code will not work, as I need to compare the Logged in EmployeeId field.

展开 | 选择 | Wrap | 行号


好的,您发布的代码看起来应该可以正常工作,但由于它不是,我们可以查看一些内容
Okay, the code you posted looks like it should work, but since it is not, there are some things we could look into
展开 | < span class =codeLinkonclick =selectAll(this);>选择 | Wrap | 行号


这篇关于访问复选框的值以打开表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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