I am only trying to add fields that don't exist in the table already from another table list. It works if all the fields are missing but when i already have that field in my table, i get an error. How can i limit the Add column to only the fields that are missing? Any help will be greatly appreciated.
Function AddField()
Dim db As Database
Dim tbl As tableDef
Dim fld As DAO.Field
...
User Profile
Collapse
-
Only add missing fields to table from another Table?
-
Thanks for the inputs. I really appreciate it.
How can i make the table in my immediate window to an access table with some adjustments.
I get something like this in the immediate window:
ID= 013536 Change Field= Outlet Old Value= ROSYNN PO New Value= ROSSLY4N PO
ID= 013536 Change Field= Business Old Value= LOTELL DRUGS New Value= LOV3L DRUGS
ID= 013536 Change Field= BusinessType Old Value= DRUG STORE New... -
I just tested the code for my data and it works. Thanks so much zmbd!!
Is there a way i can store results in a new table with only the fields i want (fields that match another table list (for the fields list to be somewhat dynamic so that i don't have to change the code everytime i want more fields but just to add the name in the list and the code takes the values from there. Thank you in advanceLeave a comment:
-
Thank you for the outline, i really appreciate it. I will try to follow and apply it to my table. I will be comparing around 50 fields with the same names in both tables.Leave a comment:
-
Compare Two Tables and Find Changes VBA
I have two tables with a unique field which i use to join the tables. I'm trying to compare the tables using access queries and some vba to find the changes within the records from the two tables. The problem is that I get the first change (field) between the tables per row rather than multiple changes within a row. For instance if the field "city" and "country" changed within a row, it only identifies one of them. I would like...Last edited by zmbd; May 15 '17, 10:48 PM. Reason: [z{please use the [Code/] formatting tool when posting Script/SQL/Tables}] -
Still still have duplicates when running the Distinct in Access
I only want the unique values (unique on rcnumber) in my table but keep getting duplicates. Any solutions other than DISTRICT ??
...Code:SELECT DISTINCT OFFice.Rcnumber, OFFice.[SAP number], OFFice.Outlet, OFFice.Business, OFFice.BusinessType, OFFice.Address, OFFice.City, OFFice.Prov, OFFice.Pcode, OFFice.PCode_FlexDeliv, OFFice.Phone, OFFice.Contact, OFFice.[Old RC], OFFice.FSA, OFFice.Node, OFFice.Open, OFFice.Close, OFFice.Renewal, OFFice.ContractYear,
Last edited by Frinavale; Jan 13 '17, 08:24 PM.
No activity results to display
Show More
Leave a comment: