basically take a copy of your database, delete anything not relevant, delete any data if it's confidential (for this issue I'm not sure any data is required anyway.
then upload it here by going into advanced mode (button next to "post quick reply" and attach the file.
the first thing I would do is add some debugging code
lngFlags = ahtOFN_ALLOWMULTISELECT Or ahtOFN_EXPLORER
Dim result As Variant
result = ahtCommonFileOpenSave(InitialDir:="C:\", _
Filter:=strFilter, FilterIndex:=3, Flags:=lngFlags, _...
As far as I am concerned a user specifies how they want the system to work.. and they have no need to know how you achieve that.
Most users don't have a clue about table layouts and normalisation... they don't need to know... just like I don't know how to do thier jobs.
As for the junction...
I am an MVP but that doesn't mean that I am not capable of being wrong... but in this case I still hold that 1 table is the most flexible way of doing it (and generally the most flexible way is the right way).
No - you have a seperate junction table which will allow you to add seperate company...
The ID field in the inserted table should match the ID in T1.
The data in inserted is a match of the inserted data - I believe that the field in the inserted table will just be a long integer. (i.e. no identity auto increment)
Sorry I missed your edit or you were typing it when I was typing my message.
As I say you can do it the other way.. but I wouldn't recommend it. I am welcome to hear any other opinions on the subject but I honestly can not think of a good reason not to store records of the same structure in the...
do you really need to match all the fields from T1 and T2?
Seems to me that using the ID (which is probably indexed) on it's own should be faster.
I would imagine that the speed improvment would probably be marginal but if this trigger runs a lot then a lot of little savings soon add up.
For the reasons I posted above I don't believe having seperate tables is less work.
It's the sort of thing that will be fine for a while and then you'll need to add a field and then you have to add it to many tables and many forms.
As I also stated once you have a supplier who also buys a car...
having seperate tables for the same information means that you either need seperate forms to edit that information of that you need to start editing your forms recordsource at runtime.... these are both unnecessary things that add complexity where it really isn't needed.
You also have the issue...
Are you saying you only want to append the records if the orderID is not already in the table already?
If so then use a sub query. In the criteria for the orderID add in
NOT IN (SELECT OrderID FROM YourTableNameThatYouAreAppendingTo)
If you are saying that the query is returning multiple...