Multiple relations ship problem.
8.5ADV WinXP
I have a table, HOURS
Field_Vehicle_ID
Field_Date
Field_Hours
I have a table FUEL
Field_Vehicle_ID
Field_Hours
Field_Description
I have a table PURCHASES (parts, add-ons)
Field_Vehicle_ID
Field_Hours
Field_Description
I have a table MAINTENANCE (oil changes, etc.)
Field_Vehicle_ID
Field_Hours
Field_Description
I want to enter the HOURS in one of the 3 tables.
Field_Hours_ID
Field_Hours
Field_Description
I can get any pair OK, but when I add a relationship to HOURS, it won't
create a new record.
HELP appreciated.
--
-------------------------------------------------
Captain Guy
s/v Island Time (Beneteau 352#277)
AICW 845.5
386-689-5088
Re: Multiple relations ship problem.
Guy wrote:
> 8.5ADV WinXP
>
> I have a table, HOURS
> Field_Vehicle_ID
> Field_Date
> Field_Hours
>
> I have a table FUEL
> Field_Vehicle_ID
> Field_Hours
> Field_Description
>
> I have a table PURCHASES (parts, add-ons)
> Field_Vehicle_ID
> Field_Hours
> Field_Description
>
> I have a table MAINTENANCE (oil changes, etc.)
> Field_Vehicle_ID
> Field_Hours
> Field_Description
>
> I want to enter the HOURS in one of the 3 tables.
> Field_Hours_ID
> Field_Hours
> Field_Description
>
> I can get any pair OK, but when I add a relationship to HOURS, it won't
> create a new record.
>
> HELP appreciated.
>
indexed the hours field? All hours field the same type?
regards
Chris
Re: Multiple relations ship problem.
yes
"Chris Brown" <cbrown [at] medicine.adelaide.edu.au> wrote in message
news:f73v2h$no5$1 [at] aioe.org...
> Guy wrote:
>> 8.5ADV WinXP
>>
>> I have a table, HOURS
>> Field_Vehicle_ID
>> Field_Date
>> Field_Hours
>>
>> I have a table FUEL
>> Field_Vehicle_ID
>> Field_Hours
>> Field_Description
>>
>> I have a table PURCHASES (parts, add-ons)
>> Field_Vehicle_ID
>> Field_Hours
>> Field_Description
>>
>> I have a table MAINTENANCE (oil changes, etc.)
>> Field_Vehicle_ID
>> Field_Hours
>> Field_Description
>>
>> I want to enter the HOURS in one of the 3 tables.
>> Field_Hours_ID
>> Field_Hours
>> Field_Description
>>
>> I can get any pair OK, but when I add a relationship to HOURS, it won't
>> create a new record.
>>
>> HELP appreciated.
>>
>
>
> indexed the hours field? All hours field the same type?
>
> regards
>
> Chris
Re: Multiple relations ship problem.
Guy wrote:
> yes
>
>
> "Chris Brown" <cbrown [at] medicine.adelaide.edu.au> wrote in message
> news:f73v2h$no5$1 [at] aioe.org...
>> Guy wrote:
>>> 8.5ADV WinXP
>>>
>>> I have a table, HOURS
>>> Field_Vehicle_ID
>>> Field_Date
>>> Field_Hours
>>>
>>> I have a table FUEL
>>> Field_Vehicle_ID
>>> Field_Hours
>>> Field_Description
>>>
>>> I have a table PURCHASES (parts, add-ons)
>>> Field_Vehicle_ID
>>> Field_Hours
>>> Field_Description
>>>
>>> I have a table MAINTENANCE (oil changes, etc.)
>>> Field_Vehicle_ID
>>> Field_Hours
>>> Field_Description
>>>
>>> I want to enter the HOURS in one of the 3 tables.
>>> Field_Hours_ID
>>> Field_Hours
>>> Field_Description
>>>
>>> I can get any pair OK, but when I add a relationship to HOURS, it won't
>>> create a new record.
>>>
>>> HELP appreciated.
>>>
>>
>> indexed the hours field? All hours field the same type?
>>
>> regards
>>
>> Chris
>
>
ok, when I sent up a acrr 'TOG chain' (A::B::C::D::E...) for the
prurposes of creating a new record in the terminal TOC, to force a new
record in each of the intermediate TOCs, I make the rel defs accr for
each direction. This sounds like your situation, which you have working,
unless you add the extra Hours field to each of the rels.
I would expect the rels to be VehicleID::VehicleID and Date::Date
initially; then add hours::Hours.
The Hours field in all 3 tables is just a time field, without auto
enter creation time...?
Not sure what this bit means:
>>> I want to enter the HOURS in one of the 3 tables.
>>> Field_Hours_ID
>>> Field_Hours
>>> Field_Description
Why not use the Hours_ID field in all the tables, and in the rels?
regards
Chris
Re: Multiple relations ship problem.
"Chris Brown" <cbrown [at] medicine.adelaide.edu.au> wrote in message
news:f76fb0$bk8$1 [at] aioe.org...
> Guy wrote:
>> yes
>>
>>
>> "Chris Brown" <cbrown [at] medicine.adelaide.edu.au> wrote in message
>> news:f73v2h$no5$1 [at] aioe.org...
>>> Guy wrote:
>>>> 8.5ADV WinXP
>>>>
>>>> I have a table, HOURS
>>>> Field_Vehicle_ID
>>>> Field_Date
>>>> Field_Hours
>>>>
>>>> I have a table FUEL
>>>> Field_Vehicle_ID
>>>> Field_Hours
>>>> Field_Description
>>>>
>>>> I have a table PURCHASES (parts, add-ons)
>>>> Field_Vehicle_ID
>>>> Field_Hours
>>>> Field_Description
>>>>
>>>> I have a table MAINTENANCE (oil changes, etc.)
>>>> Field_Vehicle_ID
>>>> Field_Hours
>>>> Field_Description
>>>>
>>>> I want to enter the HOURS in one of the 3 tables.
>>>> Field_Hours_ID
>>>> Field_Hours
>>>> Field_Description
>>>>
>>>> I can get any pair OK, but when I add a relationship to HOURS, it won't
>>>> create a new record.
>>>>
>>>> HELP appreciated.
>>>>
>>>
>>> indexed the hours field? All hours field the same type?
>>>
>>> regards
>>>
>>> Chris
>>
>>
>
>
> ok, when I sent up a acrr 'TOG chain' (A::B::C::D::E...) for the prurposes
> of creating a new record in the terminal TOC, to force a new record in
> each of the intermediate TOCs, I make the rel defs accr for each
> direction. This sounds like your situation, which you have working, unless
> you add the extra Hours field to each of the rels.
>
>
> I would expect the rels to be VehicleID::VehicleID and Date::Date
> initially; then add hours::Hours.
>
> The Hours field in all 3 tables is just a time field, without auto enter
> creation time...?
>
> Not sure what this bit means:
>
>
> >>> I want to enter the HOURS in one of the 3 tables.
> >>> Field_Hours_ID
> >>> Field_Hours
> >>> Field_Description
>
>
> Why not use the Hours_ID field in all the tables, and in the rels?
>
>
> regards
>
> Chris
Sorry I did not state the business case which migh make the question more
clear.
The Vehicles have a meter which shows the cumulative hours run. (many
vehicles idle for days and the hours rack up while the miles travelled
reamain constant. and boats also use hours only to track usage).
Fuel is tracked by the hour as is maintenance and parts. Maintenance is
scheduled on hourly (like every 100 hours, we change air filters and record
the actual hour (maybe 102) then next due is 202)
At the end of the say, I'd like a report that shows:
Vehicle--------- Date----------- Type ------------- Hours (Cumulative and
since last entry of same type)
#1 --------------- 7/7/07 -------- Fuel ------------- 125 8 (from
earlier)
#1 ----------------7/8/07 --------Fuel -------------- 135 10
#1 --------------- 7/8/07 -------- Filter --------------136 100
#1 ----------------7/9/07-------- Fuel ----------------150 15
#1-----------------7/10/07------- Belts ------------- 160
---
#1 ---------------- 7/14/07 ------- Oil change ------- 200 100
Thanks,
Guy
Re: Multiple relations ship problem.
Guy wrote:
> "Chris Brown" <cbrown [at] medicine.adelaide.edu.au> wrote in message
> news:f76fb0$bk8$1 [at] aioe.org...
>> Guy wrote:
>>> yes
>>>
>>>
>>> "Chris Brown" <cbrown [at] medicine.adelaide.edu.au> wrote in message
>>> news:f73v2h$no5$1 [at] aioe.org...
>>>> Guy wrote:
>>>>> 8.5ADV WinXP
>>>>>
>>>>> I have a table, HOURS
>>>>> Field_Vehicle_ID
>>>>> Field_Date
>>>>> Field_Hours
>>>>>
>>>>> I have a table FUEL
>>>>> Field_Vehicle_ID
>>>>> Field_Hours
>>>>> Field_Description
>>>>>
>>>>> I have a table PURCHASES (parts, add-ons)
>>>>> Field_Vehicle_ID
>>>>> Field_Hours
>>>>> Field_Description
>>>>>
>>>>> I have a table MAINTENANCE (oil changes, etc.)
>>>>> Field_Vehicle_ID
>>>>> Field_Hours
>>>>> Field_Description
>>>>>
>>>>> I want to enter the HOURS in one of the 3 tables.
>>>>> Field_Hours_ID
>>>>> Field_Hours
>>>>> Field_Description
>>>>>
>>>>> I can get any pair OK, but when I add a relationship to HOURS, it won't
>>>>> create a new record.
>>>>>
>>>>> HELP appreciated.
>>>>>
>>>> indexed the hours field? All hours field the same type?
>>>>
>>>> regards
>>>>
>>>> Chris
>>>
>>
>> ok, when I sent up a acrr 'TOG chain' (A::B::C::D::E...) for the prurposes
>> of creating a new record in the terminal TOC, to force a new record in
>> each of the intermediate TOCs, I make the rel defs accr for each
>> direction. This sounds like your situation, which you have working, unless
>> you add the extra Hours field to each of the rels.
>>
>>
>> I would expect the rels to be VehicleID::VehicleID and Date::Date
>> initially; then add hours::Hours.
>>
>> The Hours field in all 3 tables is just a time field, without auto enter
>> creation time...?
>>
>> Not sure what this bit means:
>>
>>
>>>>> I want to enter the HOURS in one of the 3 tables.
>>>>> Field_Hours_ID
>>>>> Field_Hours
>>>>> Field_Description
>>
>> Why not use the Hours_ID field in all the tables, and in the rels?
>>
>>
>> regards
>>
>> Chris
>
> Sorry I did not state the business case which migh make the question more
> clear.
>
> The Vehicles have a meter which shows the cumulative hours run. (many
> vehicles idle for days and the hours rack up while the miles travelled
> reamain constant. and boats also use hours only to track usage).
>
> Fuel is tracked by the hour as is maintenance and parts. Maintenance is
> scheduled on hourly (like every 100 hours, we change air filters and record
> the actual hour (maybe 102) then next due is 202)
>
> At the end of the say, I'd like a report that shows:
> Vehicle--------- Date----------- Type ------------- Hours (Cumulative and
> since last entry of same type)
> #1 --------------- 7/7/07 -------- Fuel ------------- 125 8 (from
> earlier)
> #1 ----------------7/8/07 --------Fuel -------------- 135 10
> #1 --------------- 7/8/07 -------- Filter --------------136 100
> #1 ----------------7/9/07-------- Fuel ----------------150 15
> #1-----------------7/10/07------- Belts ------------- 160
> ---
> #1 ---------------- 7/14/07 ------- Oil change ------- 200 100
>
> Thanks,
>
> Guy
>
>
Hi Guy,
ok, a better idea of what you are doing.
Looking at your initial 4 tables (Hours, Fuel, Purchases, Maintenance),
I assume you also have a table VEHICLES. This is essentially the pivotal
table (avoiding the implications of 'pivot' table).
I would think that your rels should all be Vehicle_ID + Date. The issue
may be how you handle data, and which table you are entering data from.
>>>>> I can get any pair OK, but when I add a relationship to HOURS, it
won't
>>>>> create a new record.
If we can start with entering a new Hours record from Vehicles table, I
would use a global date, so the rel:
VID::VID and g_Date::Date acrr
As I understand your initial post, you want to be able to create a fuel
record from any of the other tables. First things first.
The report as you have have it outlined, is date sorted, and mixed
fuel/parts/fuel... this is going to be a problem I would suggest at this
stage. Probably a multiple subsummary structure sorted by data and
related type (Fuel/maintenance/Parts...). I am already thinking a
separate Date and Type table may be a good idea.
regards
Chris