I am needing to create order references for data that we are then going to pass into 3rd party software. So the structure of the order reference has to be in a specific format for their software.
Here is some example data from the Access table 'Transactions' and the order reference that I need to create but I do not know how to do this either using update queries or VBA. I know very little with regards VBA.
The problem I have is when I have a 2 rows of order data where the Type = P and F, the order reference for both rows needs to be the same except 'S' at the end for Type = P and 'F' at the end for Type = F. So I was thinking of using the TransID and SourceID fields to link the 2 pairs together. I am wanting to use the OrderID and LineNo fields to create the Order Reference.
OrderID TransID LineNo StopID SourceID Type Reference
102 743 6 13 D 000102006
102 744 7 12 B 000102007
102 745 8 48 P 000102008S
102 746 9 98 745 F 000102008F
102 747 10 48 P 000102010S
102 748 11 67 747 F 000102010F
After I have created the Order References, I then need to update the SourceID to the corresponding StopID from the row, where TransID = SourceID.
Thanking you in advance.
Regards
Antony
Here is some example data from the Access table 'Transactions' and the order reference that I need to create but I do not know how to do this either using update queries or VBA. I know very little with regards VBA.
The problem I have is when I have a 2 rows of order data where the Type = P and F, the order reference for both rows needs to be the same except 'S' at the end for Type = P and 'F' at the end for Type = F. So I was thinking of using the TransID and SourceID fields to link the 2 pairs together. I am wanting to use the OrderID and LineNo fields to create the Order Reference.
OrderID TransID LineNo StopID SourceID Type Reference
102 743 6 13 D 000102006
102 744 7 12 B 000102007
102 745 8 48 P 000102008S
102 746 9 98 745 F 000102008F
102 747 10 48 P 000102010S
102 748 11 67 747 F 000102010F
After I have created the Order References, I then need to update the SourceID to the corresponding StopID from the row, where TransID = SourceID.
Thanking you in advance.
Regards
Antony