嗨 我正在重新发布这个帖子,因为它已经变得非常混乱,我有办法解决这个问题所以这是一个与初始线程略有不同的问题。 这里是最初的花纹 bytes/topic/access/answer...ery-date-range 只是为了澄清一下我正在努力实现.... 我有一张带有日历预订记录的表格,这些记录已从outlook导入,因此开始日期和结束日期采用以下格式:dd:mm: yyyy hh:nn:ss这就是我认为是问题的根源 我有一个表单,旨在以星期一 - 星期日的格式显示表格中的日历预订所以用户选择一个日期,并在表格上显示整周,例如,如果用户选择9/9/09,表格将显示从7/9/09 - 13/9/09类似于Outlook的工作方式s 我遇到问题的查询旨在获取该表单上的开始和结束日期范围,并在我所拥有的日期范围内返回表格中的所有日历预订现在让我的工作如何我想要它
展开 | 选择 | Wrap | 行号 解决方案语法更改应该做的伎俩: 展开 | 选择 | Wrap | Line数字
亲爱的菲尔, 最终我设法查看了你的代码,说实话,我它有点失去了它应该做什么。
- 确定周界限的部分代码有些不确定。当输入日期是星期日时,预计将在下周提供。这是它应该做的吗?
- 您的查询应该只返回startdate和endate都在给定周内的记录。这是它应该做的吗?
- 改变控件外观的代码部分是一个完全神秘的东西。根据我的理解,它改变了控件的外观,这些控件的名称是从起始日期开始的工作日签名,以及在startdate和enddate的时间部分之间的小时。再说一遍,它应该做什么?
嗨大家好 感谢您回复我 对不起造成的任何混淆 OK让我再试一次 我已经重新创建了在我的表单中的outlook日历的外观我想表示该表单上的预订就像outlook预订一样。我使用未绑定的文本框来表示日历列中的时间段,我将这些的颜色更改为代表日历预订 这些展望预订已经从outlook导入我的访问表。 幽默我一秒钟并开启展望日历并选择左侧小日历控件上的3/9/09 .. outlook在每天的列中右侧显示日期31/8/09至06/9/09(mon-sun)本周 这正是我的表单工作方式 所有我需要做的就是写一个第一个日期为31的查询/ 8/09(星期一)和最后一个日期06/9/09(星期日)并搜索该日期范围内的预订,即显示的一周的开始和结束日期 这些日期已经从用户选择中得出n在左侧的小日历控件上,即03/9/09代码然后计算出星期一(2009年8月31日)和星期日(06/09/09)的日期,并将这些日期写入字段中的表单[txtmon]和[txtsun] 下面的查询在单独运行时有效 展开 | 选择 | Wrap | 行号
Hi I am re-posting this thread because it has become very confusing and I have got some way to solving the problem so it is a slightly different question from the initial thread. here is the original tread bytes/topic/access/answer...ery-date-range Just to clarify what I am trying to achieve.... I have a table with calendar booking records which has been imported from outlook so the start date and end date are in this format dd:mm:yyyy hh:nn:ss this is what I believe is the root of the problem I have a form that is designed to display the calendar bookings from the table in a monday - sunday format so a user selects a date and on the form the full week is displayed so for example if the user selects 9/9/09 the form will display from the 7/9/09 - 13/9/09 similar to how outlook works The query that I was having problems with is designed to pick up the start and end date range on that form and return all the calendar bookings from the table within the date range I have now got this to work how I want it to
Expand|Select|Wrap|Line Numbers 解决方案 A Syntax change should do the trick: Expand|Select|Wrap|Line NumbersDear Phil, Eventually I''ve managed to look through your code and, to tell the truth, I''m somewhat lost as for what it is supposed to do.- Part of the code determining week bounds is somewhat uncertain. When entered date is Sunday it is expected to give the next week. Is it what it is supposed to do?
- You query is expected to return only those records which both startdate and endate are within a given week. Is it what it is supposed to do?
- The section of code which changes controls appearance is a total mystery. From what I''ve understood it change appearance of controls which have in their names signature of weekday taken from startdate and hours between time portions of startdate and enddate. Again, is it what it is supposed to do?
更多推荐
查询日期范围< =第2部分
发布评论