If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > can we me this smart query?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: May 2012
Posts: 111
can we me this smart query?

There is a table where in we record student name, lecture subject and presenting date since last year.
We need a query to show all the students who have made a lecture. We want the query to remove a lecturer who has presented less than a month on the same topic. For example, John made a lecture on politics on 1st August and then he again presented the same lecture on 15 August. In this case we want the second record not to be shown. However if he presents again on politics on 2nd of September it will be shown on the query.
Thank you,
__________________
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
I asked god to please give me everything to enjoy the life, God said: i gave you the life to enjoy everything.
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Nov 2011
Posts: 413
1. student criteria >"1"
2. subject criteria Is Not Null
3. date criteria Between Date() And DateAdd("M",-1,Date())

Hope this helps.
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: May 2012
Posts: 111
thank you burrina,
i am quite late to reply,
studet is a name, can we still difine its criteria to be more than one?
__________________
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
I asked god to please give me everything to enjoy the life, God said: i gave you the life to enjoy everything.
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: Nov 2011
Posts: 413
Wow, yes very late! I have slept since then. Here is my demo, you can work with it and see if it will help you.

Good Luck,
Attached Files
File Type: zip Testing.zip (28.2 KB, 4 views)
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: May 2012
Posts: 111
Dear Burrina,
thank you very much for your time,
the query is expected to show this result:

4,bubba,books,9/1/2012
1,bubba,books,10/15/2012
2,forest,fruit,11/15/2012

records with the same student name and subject will not be shown if the it is presented sooner than a month from the previous lecture.
please let me provide an other example:

table name: student lectures
fields: ID, studentname, lecture, date
records:
1, john, politics, 1/1/12
2,steve, politics,20/1/12
3, jack, economics,21/1/12
4,jack,politics,22/1/12
5,john,economics,22/1/12
6,john, politics, 25/1/12
7,john,politics,3/2/12

based on our definition the query will show all the records except the 6th one.
thank you
__________________
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
I asked god to please give me everything to enjoy the life, God said: i gave you the life to enjoy everything.
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: Nov 2011
Posts: 413
I really don't have any more time to invest in this,sorry. Maybe get someone with a little more experience. I am still a little vague as to what you exacty want anyway.

Good Luck With Your Project.
Reply With Quote
  #7 (permalink)  
Old
Registered User
 
Join Date: May 2012
Posts: 111
thank you for ur time bdw
Reply With Quote
  #8 (permalink)  
Old
Registered User
 
Join Date: Nov 2011
Posts: 413
Your Welcome.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On