自动生成的转换模式在Access 2003中 [英] Auto Generated Shift Patterns In access 2003

查看:59
本文介绍了自动生成的转换模式在Access 2003中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好



我正在寻找一些解决方案我敢打赌这个问题就像米利时代一样问我但我找不到任何answares probobly我正在寻找错误



我想与员工一起创建数据库然后我想为他们创建班次模式



例如:



模式:

 1  - 星期一星期一星期二星期二星期四星期四休息星期五星期六星期六IN 



 2  - 星期一星期一星期二星期二星期日星期四星期五星期六星期六星期六星期日星期六星期日星期六b $ b 

 3  - 星期日休息星期二星期二星期日星期四休息星期五星期六星期六星期六IN 





然后设置班次模式我希望能够将它们添加到我的数据库中的每个员工



然后从所有这些我想创建一周视图什么将显示IN和谁解决问题是我希望能够产生52周和每个ti我添加一名员工,我设置了一个起始模式,它将为员工生成一年中剩余时间的轮换



如果员工下周开始模式3他将在2周后轮换1周,所以继续52周的休息



这是一个名册功能,但我试图创造一些东西,我只是缺乏技巧这样做





任何人都可以提供帮助或拥有我可以在访问中使用的东西吗?

解决方案

有两个部分要考虑 - 数据库(Access)部分和脚本(VBA)部分:

1.数据库部分:你需要在至少2个表,例如:

第一个名为'shift'的表包含2个字段:'shift_id'(主键),'shift_desc'

存储模式,例如

shift_id = 1,shift_desc ='星期一星期一星期二星期二星期日休息星期四休息星期五星期六星期六星期日'

第二张表ca lled'employee_shift'包含至少2个字段:'employee_id'(主键),'employee_shift_id'('shift'表中'shift_id'的外键)等等

employee_id ='1 '

employee_shift_id = 1



这应该足够数据库部分。

2.至于生成班次名单,应该根据你问题中提到的业务规则由脚本(你使用的是VBA)来完成。

最后但是同样重要的是,您应该学习数据库设计,以便真正了解数据库的设计和工作方式,从数据库设计简介 [ ^ ]

Hello

I'm looking for some solution i bet the question was ask like milion times here but i can't find any answares probobly i'm looking wrong

I want to create a database with employees and then i want to create shift patterns for them

Example:

Patterns:

1 - Sunday IN Monday IN Tuesday IN Wednsday OFF Thursday OFF Friday IN Saturday IN


2 - Sunday IN Monday OFF Tuesday IN Wednsday IN Thursday OFF Friday IN Saturday IN


3 - Sunday OFF Monday IN Tuesday IN Wednsday OFF Thursday IN Friday IN Saturday IN



Then after the shift patterns are set up I want to be able to add them to each of the employee in my database

Then from all of that I want to creat a week view what will show whos IN and who is off the problem is i want to be able to generate that for 52 weeks and every time I add an employee and i set up a starting pattern it will generate the rota for the employee to rest of the year

if the employee start at pattern 3 next week he will have rotation 1 and week after 2 and so go on to rest of the 52 weeks

It's a roster function but i trying to creat something and i'm just lack of skill to do that


Any one can help or have something like that what I can use in access ?

解决方案

There are 2 parts to consider - the database (Access) part and the script (VBA) part:
1. Database part: you need at least 2 tables, for example:
First table called 'shift' that contains 2 fields: 'shift_id' (primary key), 'shift_desc'
that stores the patterns, e.g.
shift_id = 1, shift_desc= 'Sunday IN Monday IN Tuesday IN Wednsday OFF Thursday OFF Friday IN Saturday IN'
Second table called 'employee_shift' that contains at least 2 fields: 'employee_id' (primary key), 'employee_shift_id' (foreign key to 'shift_id' in the 'shift' table), etc
employee_id = '1'
employee_shift_id = 1
etc
That should be suffice for the database part.
2. As for generating the shift roster, that should be done by the script (you are using VBA) based on the business rules mentioned in your question.
Last but not least, you should learn database design in order to really understand how databases are designed and work, start from Introduction to database design[^]


这篇关于自动生成的转换模式在Access 2003中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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