且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

复杂(?)访问查询/ Excel问题

更新时间:1970-01-01 07:58:42


嘿大家好!这是我在这里的第一篇文章,希望我能够尽可能清楚地说明这一点。我有一个非常大的数据库(超过1,000,000个条目),我目前的目标是找出一个人在他或她的生命周期中在数据库中所做的''会话'的数量。


我有一张桌子,里面有每个人的记录(每个人都有自己独特的身份证),以及该人访问的日期。如果此人在3周内没有回来参观,我已将会话定义为完成。在3周后,如果该人再次访问,则会开始新的会话。


数据库中有数千名独特的人,一个人经常会访问很多人多次。


我的目标:确定每位患者的会话次数。


我在考虑导出显示的查询患者和日期到Excel,并在那里播放数据,但正如我所说,有很多条目,我使用Access / Excel 2003所以我限制在Excel约65,000行。


我在Access和VBA中都是新手,尽管在Excel中经验丰富。任何帮助都会非常感激!!


非常感谢您的时间,如果有任何问题,我会尽量让事情更清楚。祝你度过愉快的一天!


-Chris



我对这个董事会相当新,并回答问题。但是,您应该尝试设置标准。所以如果Date()> 3周(即21天)然后显示该人已经进行过会话的所有时间。从那里你可以让计数功能计算出这个人参加你的一个会话的次数。


非常感谢你的帮助。我仍然有点困惑,我会在哪里使用它?在查询的设计部分?在VBA中?


再次感谢!



非常感谢您的帮助。我仍然有点困惑,我会在哪里使用它?在查询的设计部分?在VBA?


再次感谢!



在查询本身的设计中。有一个标签指出标准。


Hey everybody! This is my first post here, so hopefully I will be able to make it as clear as possible. I have a very large database (over 1,000,000 entries) and my current goal is to find out the number of ''sessions'' that a person does during his or her lifetime in the database.

I have a table that has records of each person (each have their own unique ID), and the date of that person''s visit. I have defined a session as being complete if the person does not come back for a visit in a 3 week period. After the 3 week period, if the person comes back for another visit, a new session is started.

There are thousands of unique persons in the database, and a person will often visit many many times.

My Goal: to determine how many ''sessions'' each patient does.

I was thinking of exporting the Query that shows the patients and dates to Excel, and play with the data there, but as I said there are many many entries, and I am using Access/Excel 2003 so I am limited to about 65,000 rows in Excel.

I am a total novice in both Access and VBA, although quite experienced in Excel. Any help would be GREATLY appreciated!!

Thank you so much for your time, and I will try to make things more clear if there are any questions. Have a great day!

-Chris

Hey everybody! This is my first post here, so hopefully I will be able to make it as clear as possible. I have a very large database (over 1,000,000 entries) and my current goal is to find out the number of ''sessions'' that a person does during his or her lifetime in the database.

I have a table that has records of each person (each have their own unique ID), and the date of that person''s visit. I have defined a session as being complete if the person does not come back for a visit in a 3 week period. After the 3 week period, if the person comes back for another visit, a new session is started.

There are thousands of unique persons in the database, and a person will often visit many many times.

My Goal: to determine how many ''sessions'' each patient does.

I was thinking of exporting the Query that shows the patients and dates to Excel, and play with the data there, but as I said there are many many entries, and I am using Access/Excel 2003 so I am limited to about 65,000 rows in Excel.

I am a total novice in both Access and VBA, although quite experienced in Excel. Any help would be GREATLY appreciated!!

Thank you so much for your time, and I will try to make things more clear if there are any questions. Have a great day!

-Chris


I am fairly new to this board, and answering questions. However, you should try setting criteria. So if Date() > 3 weeks (ie. 21 days) then show all the times that person has had a "session." From there you could have the count function tally up the number of times this person/s has attended one of your "sessions."


Thanks very much for your help. I am still a bit confused though, where would I use that? In the Design portion of the Query? In VBA?

Thanks again!


Thanks very much for your help. I am still a bit confused though, where would I use that? In the Design portion of the Query? In VBA?

Thanks again!


In the design of the query itself. There is a tab that states "criteria."