If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Relationship problem?
Help needed please. This sounds very basic but I'm a newbie
to Access VB. I'm using Access XP. I have three tables with fields below as example: 1. tblOwner ownerID PK(Autonumber) name Address TelNo 2. tblLicense LicenseID PK(Autonumber) OwnerID FK LicenseNbr DateIssued DateExpired 3. tblMachines machineID PK(Autonumber) LicenseID FK SerialNbr Table Owner can have many licenses (1 to many). Table License can have many machines (1 to many). What I'm trying to do is whenever a new license number (LicenseNbr) is added, I need to have the table machine create a new set of records based on the new license number. Any help will be very much appreciated. Thanks in advance.Table Owner can have many licenses (1 to many). Table License can have many machines (1 to many). What I'm trying to do is whenever a new license number (LicenseNbr) is added, I need to have the table machine create a new set of records based on the new license number. I've created a main form for the tblOwner with two subforms but I'm having trouble with related records on the tblLicense. Any help will be very much appreciated. Thanks in advance. Canice |
#2
|
|||
|
|||
Canice
I understand the concept of one person (owner) holding multiple licenses. I'm a little fuzzy on how one license could be applied to more than one machine (?are we talking about vehicles, chainsaws or computers?) -- in my world licenses either belong to a person or belong to a machine (one-to-one).. So, why do you want the creation of a license to be automatically applied to multiple machines? And which ones? If you have 100 machines, do you want the license applied to every one? If EVERY machine gets a new license, you don't need to record the fact, do you? You just need to know the licenses... What am I missing? -- Good luck Jeff Boyce Access MVP "Canice Diaz" wrote in message ... Help needed please. This sounds very basic but I'm a newbie to Access VB. I'm using Access XP. I have three tables with fields below as example: 1. tblOwner ownerID PK(Autonumber) name Address TelNo 2. tblLicense LicenseID PK(Autonumber) OwnerID FK LicenseNbr DateIssued DateExpired 3. tblMachines machineID PK(Autonumber) LicenseID FK SerialNbr Table Owner can have many licenses (1 to many). Table License can have many machines (1 to many). What I'm trying to do is whenever a new license number (LicenseNbr) is added, I need to have the table machine create a new set of records based on the new license number. Any help will be very much appreciated. Thanks in advance.Table Owner can have many licenses (1 to many). Table License can have many machines (1 to many). What I'm trying to do is whenever a new license number (LicenseNbr) is added, I need to have the table machine create a new set of records based on the new license number. I've created a main form for the tblOwner with two subforms but I'm having trouble with related records on the tblLicense. Any help will be very much appreciated. Thanks in advance. Canice |
#3
|
|||
|
|||
to model your relationships, you need to nest your subforms. mainform is
tblOwner, correct? and subform is tblLicense, correct? that will model the one-to-many relationship between owner and licenses. now, add a subform to the tblLicense subform. that nested subform is for tblMachines. that will model the one-to-many relationship between license and machines. hth "Canice Diaz" wrote in message ... Help needed please. This sounds very basic but I'm a newbie to Access VB. I'm using Access XP. I have three tables with fields below as example: 1. tblOwner ownerID PK(Autonumber) name Address TelNo 2. tblLicense LicenseID PK(Autonumber) OwnerID FK LicenseNbr DateIssued DateExpired 3. tblMachines machineID PK(Autonumber) LicenseID FK SerialNbr Table Owner can have many licenses (1 to many). Table License can have many machines (1 to many). What I'm trying to do is whenever a new license number (LicenseNbr) is added, I need to have the table machine create a new set of records based on the new license number. Any help will be very much appreciated. Thanks in advance.Table Owner can have many licenses (1 to many). Table License can have many machines (1 to many). What I'm trying to do is whenever a new license number (LicenseNbr) is added, I need to have the table machine create a new set of records based on the new license number. I've created a main form for the tblOwner with two subforms but I'm having trouble with related records on the tblLicense. Any help will be very much appreciated. Thanks in advance. Canice |
#4
|
|||
|
|||
Hi Jeff,
Thanks for replying. The reason for this is that where I work, we control the machines individually. I'm talking about amusement machines such as poker machines. We tag each one of them a unique number and we keep track of their mfg serial numbers. The owner is required to obtain another license if he wants to add more machines to his establishment (place of business). That is why one owner can have many licenses. Thanks Jeff. "Jeff Boyce" -DISCARD_HYPHEN_TO_END wrote in message ... Canice I understand the concept of one person (owner) holding multiple licenses. I'm a little fuzzy on how one license could be applied to more than one machine (?are we talking about vehicles, chainsaws or computers?) -- in my world licenses either belong to a person or belong to a machine (one-to-one).. So, why do you want the creation of a license to be automatically applied to multiple machines? And which ones? If you have 100 machines, do you want the license applied to every one? If EVERY machine gets a new license, you don't need to record the fact, do you? You just need to know the licenses... What am I missing? -- Good luck Jeff Boyce Access MVP "Canice Diaz" wrote in message ... Help needed please. This sounds very basic but I'm a newbie to Access VB. I'm using Access XP. I have three tables with fields below as example: 1. tblOwner ownerID PK(Autonumber) name Address TelNo 2. tblLicense LicenseID PK(Autonumber) OwnerID FK LicenseNbr DateIssued DateExpired 3. tblMachines machineID PK(Autonumber) LicenseID FK SerialNbr Table Owner can have many licenses (1 to many). Table License can have many machines (1 to many). What I'm trying to do is whenever a new license number (LicenseNbr) is added, I need to have the table machine create a new set of records based on the new license number. Any help will be very much appreciated. Thanks in advance.Table Owner can have many licenses (1 to many). Table License can have many machines (1 to many). What I'm trying to do is whenever a new license number (LicenseNbr) is added, I need to have the table machine create a new set of records based on the new license number. I've created a main form for the tblOwner with two subforms but I'm having trouble with related records on the tblLicense. Any help will be very much appreciated. Thanks in advance. Canice |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Table Design & Relationship problem... | Niko | Database Design | 7 | October 23rd, 2004 02:10 PM |
Access 2002 Print Problem | Tom Developer | Setting Up & Running Reports | 0 | October 21st, 2004 10:51 PM |
Table Wizard Does Not Set Relationship if Foreign Key and Primary Key Name Do Not Match Exactly in Case. | HDW | Database Design | 3 | October 16th, 2004 03:42 AM |
Query problem - many to many relationship | Deb Smith | Using Forms | 0 | July 13th, 2004 04:06 AM |