I have 3 text files which I import into Access: Day1, Day2 and Day3. Each file is a fixed width file and has only one column with no column title. During the import for each table, I give the column a name - SerialNumber. So I have 3 tables in Access, each with one column of type Long Interger, field width = 7. All entries in a table are unique i.e. no duplicates.
Next, I write a query to give me all those numbers that appear in all three tables:
I run it and it works.
I'd like to automate this. I decided to use a macro. My thinking is:
- delete all 3 tables (because the UPDATE command in Access seems to append data together and I don't want that)
- import all three tables again.
- Run the existing query.
I can get my query to successfully accomplish steps 1 & 2 but the problem is in step 3 - the relationship demonstrated by the graphic above has now gone because the tables were deleted.
My question - How can I re-create this relationship in a macro?
Any help appreciated