Has anyone done this before? If so, help would be appreciated.
I have three 'main' tables, Projects, Sites and Rooms. These are joined by two linking tables to overcome the many-many relationships.
So one project may have many sites and vice versa, and one site may have many rooms and vice versa.
tblSites has default entries, and a user may choose to put more than 1 of one default site within a project:
ProjName SiteName Quantity
Project1 DefaultSite1 3
- this is the linking table tblProjSite
All the data entry, selection of sites etc. is done through forms. At a later stage, users will need to 'specify' the default sites, give them names, change attributes and so on.
What I need to do, on a button click is to check which Site needs to be specified, and in tblSites, copy the record for this site the correct number of times, giving it a new name each time:
DefaultSite1Temp1
DefaultSite1Temp2
DefaultSite1Temp3
Then, for each of these, I need to duplicate the records in the two linking tables that already exist for DefaultSite1.
Basically, anywhere in the Database that DefaultSite1 (or whatever) is mentioned, it needs to be replicated for each of the specific sites that are about to be created. With the new name (which the user will be prompted to change straight away).
Has anyone ever done anything like this????
Cheers in advance for your help.![[pipe] [pipe] [pipe]](/data/assets/smilies/pipe.gif)
I have three 'main' tables, Projects, Sites and Rooms. These are joined by two linking tables to overcome the many-many relationships.
So one project may have many sites and vice versa, and one site may have many rooms and vice versa.
tblSites has default entries, and a user may choose to put more than 1 of one default site within a project:
ProjName SiteName Quantity
Project1 DefaultSite1 3
- this is the linking table tblProjSite
All the data entry, selection of sites etc. is done through forms. At a later stage, users will need to 'specify' the default sites, give them names, change attributes and so on.
What I need to do, on a button click is to check which Site needs to be specified, and in tblSites, copy the record for this site the correct number of times, giving it a new name each time:
DefaultSite1Temp1
DefaultSite1Temp2
DefaultSite1Temp3
Then, for each of these, I need to duplicate the records in the two linking tables that already exist for DefaultSite1.
Basically, anywhere in the Database that DefaultSite1 (or whatever) is mentioned, it needs to be replicated for each of the specific sites that are about to be created. With the new name (which the user will be prompted to change straight away).
Has anyone ever done anything like this????
Cheers in advance for your help.
![[pipe] [pipe] [pipe]](/data/assets/smilies/pipe.gif)