Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old December 2nd, 2003, 10:31 AM
lil_me lil_me is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 1 lil_me User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
working with a MS Access calendar

Hello, everyone

I'm by no means an expert with Access, and need help with what's probably a small problem....

OK, I've got a calendar on a form. When the user clicks the Go button (next to the calendar), the selected calendar date is passed into a hidden text field in the form 01/01/2003.

This field's value is used to look up matching records in my tables (i.e. find records that SailDate matches the value of the text box, and then open a second small form that shows SailDate, ShipName, DepartedFrom, WentTo... you get the picture. pretty simple. i think).

Note: i've also made it so that these fields only show up on the second form that's opened IF there are matching data... if a search for a date returns no data, it sets all fields to field.visible=false and warninglabel.visible = true... warninglabel being a small bit of text that says "No data found".

this all works fine, after many hours of pulling out hair, consulting various texts and websites, etc...

OK... now my problem.

I would like it if I could add another feature to users...

basically, make it so that a user can search not just for records with the date they specify, but so that a user can specify a date (always a monday) and records for that WEEK show up. like a " you searched for records with week starting 01/01/2003" kinda thing.

So that if a user types in 01/12/2003 (this month, starting on a monday)... the records that match 01/12/2003, 02/12/2003... until 07/12/2003 will show up.

If a user types in/selects a date from the calendar that is NOT a monday, a msg box appears telling them so and no further action is taken

So there are two sections to this: firstly, making sure the selected date is a Monday, secondly making it so that the selected date AND the next six dates are matched to the records.


Unfortunatly, I don't know how to do either of these... I'm thinking that for the second problem maybe I could get the user to type in 01/01/2003 and somehow just count on six more days, assign it like

textboxday1 = 01/01/2003
textboxday2 = 02/01/2003
textboxday3 = 03/01/2003
textboxday4 = 04/01/2003
textboxday5 = 05/01/2003
textboxday6 = 06/01/2003
textboxday7 = 07/01/2003

.. you know... just have seven hidden text boxes and match my searching terms from all seven.... but it's very messy and i don't really know what i'm doing


Thanks for any help with this

Reply With Quote
  #2  
Old December 2nd, 2003, 12:58 PM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 13
Look at the DateAdd Function

dateOneMonthAway=DateAdd("m", 1, [SelectedDate])

I think that this is correct, but you are after the dateadd function


S-

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > working with a MS Access calendar


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT