Results 1 to 6 of 6
  1. #1
    clive2011 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Posts
    4

    Question Help with relationships

    Hi.

    I'm developing a database to show vehicle usage across the company that shows mileage per vehicle on a daily basis along with the dates that a given vehicle fillled up with gas - how much gas etc.

    I have a master file with vehicle info.

    I have a table that records when each vehicle fills up with gas.

    I have a table that records GPS data from each vehicle and calculates mileage driven on a daily basis.

    Right now the relationships are built up as a one to one. The VIN is unique so its a primary key in the master file. In the Gallons and Mileage tables, the VINS will appear multiple times, every day for the mileage table, and in the gallons table by the days that they fill up.



    Right now with a one to one relationship, because the gallons table will only have records for the days that vehicles filled up, it will not show records from the mileage table where vehicles could have been driving.

    How can I make it return rows that show all mileage records and gallons records too - even if no gas was purchased, in which case null or a substitued value could be displayed.

    The only unique value is the VIN. However the VIN does not appear in the mileage table - but the Tech ID does so created a table with VINS and TECHS that creates a bridge.

    I'm at a loss. Any ideas? I would attach the database but it contains sensitive info but I can further describe the situation if there are questions.

    Thanks

    Clive

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    It would be helpful if you posted a sanitized copy of your db. Make sure to run a compact and repair and remove(make dummy info) for any confidential information.

  3. #3
    clive2011 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Posts
    4
    I just tried uploading. even after pruning down what was not appropriate to send and only leaving table structures, it would not upload.

    The overall size is 796MB even after pruning down. The max upload size here is 500KB which is next to nothing.

    The next best thing although not ideal was to take a screen dump so you can see the relationships and the tables I am dealing with

    Thanks

  4. #4
    clive2011 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Posts
    4
    Hi again,

    I missed a key point in your reply - to compact database (duh on my part)

    It should now upload.

    here it is.

    Your help is appreciated.

    Thanks

  5. #5
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    You have no sample data included. Please load some sample data and I will relook at the db.

    Alan

  6. #6
    clive2011 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Posts
    4
    Thanks Alan,

    A colleague came to the rescue instead.

    Thanks for your offer of help though.


    Regards

    Clive

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Relationships I think
    By darlaj5 in forum Access
    Replies: 2
    Last Post: 05-04-2011, 08:37 PM
  2. One to One Relationships
    By ketbdnetbp in forum Database Design
    Replies: 1
    Last Post: 04-27-2011, 11:22 AM
  3. Help with Many to Many Relationships
    By alpinegroove in forum Database Design
    Replies: 5
    Last Post: 03-24-2011, 01:12 PM
  4. Too Many Relationships
    By MikeT in forum Database Design
    Replies: 4
    Last Post: 08-25-2010, 07:23 PM
  5. Relationships?
    By rosh41 in forum Database Design
    Replies: 2
    Last Post: 06-23-2010, 01:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums