使用日期填充网格 [英] Populating a Grid with dates

查看:53
本文介绍了使用日期填充网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每一个人,

我在建造一个DB时遇到问题,除了前面的表格,我已经把它全部整理好了。我想要做的是填充一个9行乘14列的网格,其中包含到达日期或出发日期,这些日期在qryDailyBookings中。

9行是txtboxes名称Room1 thu Room9它们是未绑定的。

14个列是名为Date1到date14的txtbox,其控制源为:

Hi Every one,
I have a problem with a DB I''m building, I''ve got it all finisherd except the front form. What I''m trying to do is populate a grid of 9 rows by 14 colums with either arrival dates or departure dates, these dates are in a qryDailyBookings.
The 9 row are txtboxes names Room1 thu Room9 they are unbound.
The 14 colums are txtboxes named Date1 thru Date14 and have a controlsource of :

展开 | 选择 | 换行 | 行号

推荐答案

我不确定您如何捕获不同的到达日期,或者为什么使用dateAdd而不是dateDiff函数。无论如何,你可以设置一个类似于以下的循环:

I am not sure how you capture the different arrival dates, or why you are using the dateAdd instead of the dateDiff function. Irregardless, you could set up a loop similar to the following:

展开 | 选择 | Wrap | 行号


谢谢你的回答puppydogbuddy,

我正在努力建立一个小型汽车旅馆(9个房间)的前台数据库,我的妻子和我已经接管了,而不是购买一台非常昂贵的BD,具有很多功能不需要,我正在开发我们自己的,如果您曾经见过这些,它是第一个以网格形式显示房间预订的窗体和多长时间,通过从下拉列表中选择日期n calander,然后填充第一行,其中包含选定时间段的持续日期,我的时间为两周。

从答案建议的是[startdate]是选择的日期,不是这样,它可能是两周内的任何地方。我正在使用Access 2003,(之前忘了提这个)。

ArrivalDate由另一个表格FrmRegistration捕获并保存在tblRegistration中,qryDailyBookings就是在这个tbl上制作的。

再次谢谢你,请帮忙。
Thankyou for your answer puppydogbuddy,
What I''m trying to build is a front office DB for a small motel (9 rooms) my wife and I have taken over and instead of buying a very expensive BD with a lot of functions that are not needed, I am developing our own, If you have ever seen any of these, its the first form that shows in a grid form rooms booked and for how long, by selecting a date from a drop down calander, and this then fills the first row with ongoing dates covering a chosen time period, mine covers two weeks.
From what your answwer suggests is [startdate] is the date selected which is not so, it could be anywhere in the two week period. I''m using Access 2003,(forgot to mention this before).
The ArrivalDate is captured by another form FrmRegistration and held in tblRegistration, the qryDailyBookings is made on this tbl.
Thankyou again and please help.


如果从日历中选择的StartDate不是ArrivalDate,那么StartDate究竟是什么?如果我现在假设StartDate仅用于指定您正在跟踪到达和离开的14天块的开始日期,那么您似乎正在使用Date1到Date14来查看您跟踪到达的块中的各个日期和离开?...这样的事情。

If the StartDate selected from the calendar is not the ArrivalDate, exactly what is the StartDate? If I now assume StartDate is just used to designate the beginning date of the 14 day block for which you are tracking the arrivals and departures, then you appear to be using Date1 thru Date14 for individual days within the block for which you are tracking arrivals and departures?..something like this.

展开 | 选择 | Wrap | 行号


这篇关于使用日期填充网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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