Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 28th, 2006, 07:52 PM
Registered User
 
Join Date: Dec 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Calendar Add-in

I know a little VBA, but don't know if this is possible. I want to use the calendar to log when taxi journeys are taking place. Where I work, we organise taxi contracts for school students etc. I have a form that has individual month fields (in 'memo' format) where you can type in dates for that month, time of journey for that contract etc. However, it would be much quicker if you could just click on a calendar date, and that date would be added on as a string to the data already in that month field. Is this possible, or even wise? I would also want to keep track of the number of strings added, so that the database could work out the invoice amount for that month automatically. And when the particular month field is selected from the dropdown box, the calendar for that month would also appear.

  #2 (permalink)  
Old January 3rd, 2007, 01:41 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

First of all I think there is a database design issue here. You shouldn't have one record with all the trips in it for the month. You should have one record for each trip. This eliminates your need here, and also speeds invoicing. I would strongly urge against concatenating date strings and then trying to parse them at the end of the month, although that can quite readily be done.



mmcdonal
  #3 (permalink)  
Old January 3rd, 2007, 04:55 PM
Registered User
 
Join Date: Dec 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, I had thought of that. I'm just not sure how to go about it, from a form point of view. I would probably get a bunch of dates in at once, with possibly two (or more) trips per day. That would perhaps preclude using the calendar? I suppose when clicking on a date there could then be an option to select am or pm or something? At some stage the dates and trip information would have to be concatenated, but this would only be for the purpose of a customised report that would be faxed to the taxi contractor.

AAAghghghghhh! Don't know where to start. . .

  #4 (permalink)  
Old January 4th, 2007, 08:36 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Offhand, the design would be:

tblDriver
DriverID - PK
etc

tblPassenger
PassID - PK
etc

tblTrip
TripID - PK
DriverID - FK
PassID - FK
TripDate - Date/Time
TripTime - Date/Time
etc

This will allow you to have a single record for each trip.

Then to create your report, just select * from tblTrip WHERE DriverID = etc, join on DriverID, group by date.

Then there is no reason to concatenate fields since they will all be in the report anyway.

Does that help?

mmcdonal
  #5 (permalink)  
Old January 4th, 2007, 08:36 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Sorry, I accidentally unsubscribed.

mmcdonal


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendar like calendar in AJAX in ASP.NET h@ckerz ASP.NET 2.0 Professional 0 February 19th, 2008 12:56 AM
Add New Sharepoint 2007 Calendar type mashiamehdian SharePoint Development 0 February 4th, 2008 07:51 AM
Using Calendar Add-in Grahamski Access VBA 1 January 3rd, 2007 03:52 PM
Add Push button or Check Box in outlook add-ins capdevs VS.NET 2002/2003 0 January 7th, 2006 08:51 AM
Calendar kekohchaa VS.NET 2002/2003 4 April 7th, 2004 05:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.