向db添加日期字段 [英] Adding a date field to db

查看:78
本文介绍了向db添加日期字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!


我的数据库允许所有员工随时输入他们的时间并获得报告。第一个屏幕有一个日历,该日历被锁定到付款期的最后一天,该日期是当前唯一的日期。用户从下拉列表中选择他/她的姓名,点击日历,然后点击下一步按钮。到达时间输入屏幕。有组合框可以选择成本代码,项目和公司名称。星期日至星期六的工作小时数可以单独使用,如果他们选择,员工可以在不同的行上输入每天的时间。这允许他们在常规时间,休假时间,在不同项目中工作的小时等单独的线路等。我们的大多数员工都是免税的,但是受薪的员工需要一种机制来在他们的所有工作时间内输入每行的日期。考虑到这个需求,我根据三个表放入了三个组合框:tblMonth,tblDay和tblYear。问题是,当我选择1月,作为一个例子,从cboMonth,所有可用的行都填充了1月。 cboDay和cboYear也会出现同样的情况。我真的无法弄清楚我哪里出了问题并希望得到任何帮助。


提前感谢任何人可以提供的帮助,如果你需要真正看到数据库我很乐意发送它。


谢谢!


Rio

Hi all!

My database allows all employees to enter their time and get a report at any time. The first screen has a calendar which is locked to the last day of the pay period and that date is the only one currently in place. The user selects his/her name from a dropdown, clicks the calendar, then "Next" to get to the time input screen. There are combo boxes to select the cost code, project, and company name. Separate boxes are available for the number of hours worked Sunday thru Saturday, and the employee can input their time for each day on separate lines, if they choose to. This allows them to have a separate line for regular time, vacation hours, hours worked in different projects, etc. Most of our employees are exempt, but the salaried ones are needing a mechanism to enter the date in each line for all of their hours. With this need in mind, I put in three combo boxes based on three tables: tblMonth, tblDay, and tblYear. Problem is, when I select January, as an example, from cboMonth, all of the available lines are populated with January. The same thing occurs with cboDay and cboYear. I really can''t figure out where I have gone wrong and would appreciate any help.

Thanks in advance for whatever help anyone can render, and if you need to actually see the database, I will gladly send it.

Thanks!

Rio

推荐答案


大家好!


我的数据库允许所有员工随时输入他们的时间并获得报告。第一个屏幕有一个日历,该日历被锁定到付款期的最后一天,该日期是当前唯一的日期。用户从下拉列表中选择他/她的姓名,点击日历,然后点击下一步按钮。到达时间输入屏幕。有组合框可以选择成本代码,项目和公司名称。星期日至星期六的工作小时数可以单独使用,如果他们选择,员工可以在不同的行上输入每天的时间。这允许他们在常规时间,休假时间,在不同项目中工作的小时等单独的线路等。我们的大多数员工都是免税的,但是受薪的员工需要一种机制来在他们的所有工作时间内输入每行的日期。考虑到这个需求,我根据三个表放入了三个组合框:tblMonth,tblDay和tblYear。问题是,当我选择1月,作为一个例子,从cboMonth,所有可用的行都填充了1月。 cboDay和cboYear也会出现同样的情况。我真的无法弄清楚我哪里出了问题并希望得到任何帮助。


提前感谢任何人可以提供的帮助,如果你需要真正看到数据库,我很乐意发送它。


谢谢!


里约
Hi all!

My database allows all employees to enter their time and get a report at any time. The first screen has a calendar which is locked to the last day of the pay period and that date is the only one currently in place. The user selects his/her name from a dropdown, clicks the calendar, then "Next" to get to the time input screen. There are combo boxes to select the cost code, project, and company name. Separate boxes are available for the number of hours worked Sunday thru Saturday, and the employee can input their time for each day on separate lines, if they choose to. This allows them to have a separate line for regular time, vacation hours, hours worked in different projects, etc. Most of our employees are exempt, but the salaried ones are needing a mechanism to enter the date in each line for all of their hours. With this need in mind, I put in three combo boxes based on three tables: tblMonth, tblDay, and tblYear. Problem is, when I select January, as an example, from cboMonth, all of the available lines are populated with January. The same thing occurs with cboDay and cboYear. I really can''t figure out where I have gone wrong and would appreciate any help.

Thanks in advance for whatever help anyone can render, and if you need to actually see the database, I will gladly send it.

Thanks!

Rio



你在组合框上使用了什么事件代码?你可以发帖吗。

What event code are you using on the combo boxes? Can you post it.


我没有编写代码,只是从向导构建的。抱歉。


Rio
I did not write code, merely built from wizard. Sorry.

Rio


如果你在设计视图中打开表单,然后选择控件(ComboBoxes; TextBoxes;等)然后查看属性(工具栏上有一个按钮或Alt-Enter应该同样有效)查找设置为事件过程​​的任何属性。如果您找到任何内容,请在选择属性后单击右侧的省略框(带有三个''。's(...)的小方框),然后复制该窗口中的代码。
If you open the form in design view then select the controls (ComboBoxes; TextBoxes; etc) in order then look through the properties (There is a button on a toolbar or Alt-Enter should work equally well) look for any properties set to ''Event Procedure''. Where you find any, click on the elipsis box (little box with three ''.''s (...)) on the right AFTER you select the property then copy the code found in that window.


这篇关于向db添加日期字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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