Have not been here in a while. Hope all is well in Access land. My company here is getting a bit restrictive on the internet access we get.
Anyway on to my problem/issue.
I have a dB I am creating for Account Executives to create quotes to be sent to clients. Everything was going well until I got the functionality request from users and from executive management to be able to track the changes to a quote, revisions we call them.
I have 2 tables:
Quotes: (One Side)
QuoteID, Primary Key
Quotes Details: (Many Side)
QuoteID + ProductID - Combined Primary Key, to prevent same ProductID being selected twice on the same order, (user increases qty, yes I know I could do it in code and may do so but it works for now.)
There is currently a one-to-many relationship here. Works fine as intended.
I want to add a revision number to the main Quote table. So now it would have 2 primary keys, QuoteID + RevisionID. When I do this I lose the 1:m relationship, it becomes "Indeterminate" as you might guess.
Would you recommend changing the Detail table to have a new primary field called "QuoteDetailID" (AutoNumber Primary Key). Add QuoteID as a Foreign Key and use code to prevent the same ProductID from being placed on the same Quote more than once?
In simpler terms I want the user to be able to add a quote, make changes to it, get prompted with a question of whether it is a revision or an oops I made a mistake update, if revision then a the current quote is untouched and a new record is inserted with a revision number. (The quote ID never changes just the revision number)
sorry for the length. thanks for any input.
etrain
Remember the Past, Plan for the Future, yet Live in the Now for tomorrow may never come.
-etrain
Anyway on to my problem/issue.
I have a dB I am creating for Account Executives to create quotes to be sent to clients. Everything was going well until I got the functionality request from users and from executive management to be able to track the changes to a quote, revisions we call them.
I have 2 tables:
Quotes: (One Side)
QuoteID, Primary Key
Quotes Details: (Many Side)
QuoteID + ProductID - Combined Primary Key, to prevent same ProductID being selected twice on the same order, (user increases qty, yes I know I could do it in code and may do so but it works for now.)
There is currently a one-to-many relationship here. Works fine as intended.
I want to add a revision number to the main Quote table. So now it would have 2 primary keys, QuoteID + RevisionID. When I do this I lose the 1:m relationship, it becomes "Indeterminate" as you might guess.
Would you recommend changing the Detail table to have a new primary field called "QuoteDetailID" (AutoNumber Primary Key). Add QuoteID as a Foreign Key and use code to prevent the same ProductID from being placed on the same Quote more than once?
In simpler terms I want the user to be able to add a quote, make changes to it, get prompted with a question of whether it is a revision or an oops I made a mistake update, if revision then a the current quote is untouched and a new record is inserted with a revision number. (The quote ID never changes just the revision number)
sorry for the length. thanks for any input.
etrain
Remember the Past, Plan for the Future, yet Live in the Now for tomorrow may never come.
-etrain