dthomas
06-22-2004, 12:48 PM
Not sure if this is possible, but would be very grateful for any help. I have a database called pmtest, within it is a table called Devices and a table called Device List. I made it so that within Devices you can click the field for product and then select things like printer, computer, monitor, etc. In the table called Device List is a field named each of these items with a memo that contains a procedure for preventative maintenance. I would like to be able to select the product in the device table and then have it automatically enter the appropriate procedure memo from Device List into the procedure field in the Device table. This may not make much sense, but basically is there a way to automatically update one field based on the contents of another field. I don't know a whole lot about access so any help is great. Thanks.
Len Boorman
06-23-2004, 01:41 AM
Since you basically already have a link between the Device type and the preventative Maintenance you do not need to copy it at all. Indeed you should avoid copying the field.
As it is you can refere to it via the realationship. If you need to change the procedure then you only need to change it in one place. All Devices using this field will reflect the change.
L
dthomas
06-23-2004, 07:24 AM
Thanks for the reply. If I use a relationship in this way, will I have to type each entry as far as unique identifier into each table? I ask this because each procedure works for a whole set of general items. For example all computers would use the same procedure, so in my Device List I only have general fields, like printer, computer, etc. It seems that I would need a unique identifier for each item in the second table, which would mean I need to type this in both tables. Not sure if this makes sense.
Len Boorman
06-23-2004, 07:43 AM
Basically it is a very simple relationship
Table Device
Device ID
Device Type 1 (printer etc)
etc
Table Device List
Device Type
Maintenance Task
So the Device Type 1 in Table Device MUST be a valid selection from Table Device List.
The relationship is 1 to many from Device Type to Device Type 1
So every Device ID is defined as a Device Type via the Device Type 1 field. This must be done but then you do not need the Device ID in the Table Device List because the relationship is via Device Type 1 and Device Type.
HTH
Len
dthomas
06-23-2004, 10:15 AM
Ahh, I see, thanks again for the reply. The only other question I have is, then how will that data be available, to say a form. What I mean is once the relationship is built, how does that actually affect getting to the procedures from within the Devices table. Say I want to print a form that has all the data fields from the Devices table, but I also want to include the procedure for each device from the Device List table? Sorry, this is probably obvious, but I don't know much about access.
Thanks
Len Boorman
06-23-2004, 11:52 PM
All forms and all reports should be based upon a query. It is the query that extracts the data you want to view or print. The Form or Report is purely the medium to display the retrieved information.
Queries are really the power underlying a database
L
dthomas
06-24-2004, 10:43 AM
Got it working, thanks a ton for the help. :D