R
RealClass
Hi All,
I hope someone has the time and patience to follow this - as I usually make a meal of my problem explanations. The problem is quite simple but the explanation is just a bit waffly.
I have 2 tables: Assets (all assets of a desk - base unit, mouse, keyboard, vdu etc.) - usually lumped together to make a Station - and Fixtures (those little boxes on the wall that connect base
units, telephones etc. onto the network.
My problem is on how to 'manage' the relationships between the two tables. Bearing in mind here that at the moment there is no fixture information held against any of the assets on the Asset table -
it's all held on the Fixtures table. Here is a brief description of where I've been so far...
1. I had a field on the form to which I built a Asset -> Fixture relationship which showed which fixture belonged to the asset. In effect the recordsource for this field was just the relationship. At
this stage my original Fixture table wasn't well defined and didn't have a primary key. So this relationship allowed me to actually make changes to the Fixtures table. This approach worked to an
extent but left records with blank fixture id's when one was removed from an asset.
I really needed a more robust approach to maintaining not just the Fixtures but my plan is to add a Faults table to it.
2. I have since wrote all the VB code to allow me to make all the changes to the Fixtures table - I tightened up the primary key (no duplicates). I then put an unbound filed on the form and hoped to
update it by reading each record as the assets were being built up into their respective Stations. This didn't work well because each value turns out the same - as I have since found that it will with
unbound controls. So the dummy field acting as a conduit to get to my Fixtures table idea didn't work well at all.
That was a shame because a dummy field - not stored anywhere but just used only to display the assets' fixture seemed nice and unobtrusive.
3. I then went back to idea no. 1. and built the relationship back up and stuck it behind a control on the form again, modified the code which looked at records as they were being built up, and hoped
to still use the remaining code to 'manage' the fixtures. Trouble here, now that the Fixtures table is tight and there are no duplicates in the primary key, as soon as I delete the fixture from the
Asset, Jet steps in and says that the relationship is invalid as there would be a record with no key. Point taken - it's right. Trouble is, processing doesn't even load my code so I can't code around
it.
My questions then (amongst many)...
Q1. Do I hold fixture details against the asset 'and' the fixture ie. duplicating the details just in order for me to run all the code myself. Obviously this would in effect just be a 'dummy' field
held aagainst each asset - I would have to ascertain if what the user was doing was valid or not ? This seems such an overhead for each record though.
Q2. Is there a way of displaying a field in a datasheet view but not have it related (and updated) in any way to the original table ? If this is possible I don't know how to do it.
I need to some guidance here please. I'm sorry for the lengthy explanation, but I didn't want to be vague. I feel I'm losing my way a little, can someone bring me back onto the design
straight-and-narrow and point me where I need to go ?
Regards,
Dave
I hope someone has the time and patience to follow this - as I usually make a meal of my problem explanations. The problem is quite simple but the explanation is just a bit waffly.
I have 2 tables: Assets (all assets of a desk - base unit, mouse, keyboard, vdu etc.) - usually lumped together to make a Station - and Fixtures (those little boxes on the wall that connect base
units, telephones etc. onto the network.
My problem is on how to 'manage' the relationships between the two tables. Bearing in mind here that at the moment there is no fixture information held against any of the assets on the Asset table -
it's all held on the Fixtures table. Here is a brief description of where I've been so far...
1. I had a field on the form to which I built a Asset -> Fixture relationship which showed which fixture belonged to the asset. In effect the recordsource for this field was just the relationship. At
this stage my original Fixture table wasn't well defined and didn't have a primary key. So this relationship allowed me to actually make changes to the Fixtures table. This approach worked to an
extent but left records with blank fixture id's when one was removed from an asset.
I really needed a more robust approach to maintaining not just the Fixtures but my plan is to add a Faults table to it.
2. I have since wrote all the VB code to allow me to make all the changes to the Fixtures table - I tightened up the primary key (no duplicates). I then put an unbound filed on the form and hoped to
update it by reading each record as the assets were being built up into their respective Stations. This didn't work well because each value turns out the same - as I have since found that it will with
unbound controls. So the dummy field acting as a conduit to get to my Fixtures table idea didn't work well at all.
That was a shame because a dummy field - not stored anywhere but just used only to display the assets' fixture seemed nice and unobtrusive.
3. I then went back to idea no. 1. and built the relationship back up and stuck it behind a control on the form again, modified the code which looked at records as they were being built up, and hoped
to still use the remaining code to 'manage' the fixtures. Trouble here, now that the Fixtures table is tight and there are no duplicates in the primary key, as soon as I delete the fixture from the
Asset, Jet steps in and says that the relationship is invalid as there would be a record with no key. Point taken - it's right. Trouble is, processing doesn't even load my code so I can't code around
it.
My questions then (amongst many)...
Q1. Do I hold fixture details against the asset 'and' the fixture ie. duplicating the details just in order for me to run all the code myself. Obviously this would in effect just be a 'dummy' field
held aagainst each asset - I would have to ascertain if what the user was doing was valid or not ? This seems such an overhead for each record though.
Q2. Is there a way of displaying a field in a datasheet view but not have it related (and updated) in any way to the original table ? If this is possible I don't know how to do it.
I need to some guidance here please. I'm sorry for the lengthy explanation, but I didn't want to be vague. I feel I'm losing my way a little, can someone bring me back onto the design
straight-and-narrow and point me where I need to go ?
Regards,
Dave