apopa
Attached is a simple database based upon my first code
You really need to examine the code before you run any of so that you understand what it is that you are doing. More than likely the code will only partially match what you are working with!
So to use this database unzip it somewhere convenient
Open
First thing to do is to look at the three queries
(these are based on
Post#5 )
(I could have combined Step_01 with either Step_02 to make a single query; however, I've broken this down so that you can see what is happening):
Q_Step_01_OnlyOnlyMatching
Q_Step_02a_NoChangesBetweenTables
Q_Step_02b_RecordsWithChangesBetwenTables
Step_01 ensures that we're only working with records that appear in both tbl_people and tbl_people_2
Step_02a will return either only those records that do not have changes between the two tables or Step_02b will return only those that do have changes.
Because the tables have records where the fields are Null the query is a bit more complex as I said in my
earlier post. The queries Step_02 will show the null value fields as "... ..." which I would be somewhat unusual to see in normal practice (I've used other combinations including "ZIsNull" as in the previous post) and, as I mentioned before, if you have no null fields then the SQL can be greatly simplified.
Step_02b is the route I would recommend as there's no bloat, you can easily build a report from it etc... and best of all it runs in a script disabled environment;
HOWEVER, I noted that you said that there's
some 50 fields; (
@_
@) thus, this might be a pain to create by hand, I'd most likely do this same thing in VBA by creating the SQL and either adding the sql to the querydefs or some sort of automation.
(also, when I created the query in the editor window, the formulas in the conditions row were under their corresponding table fields. Access split these out into their own columns during its optimization step)
Now for two versions of the code as outlined in
my first post and modified per an earlier post you made (hmm)
These are only one approach to the questions and conditions you've mentioned. You really need to carefully read through the code script so that you understand what is happening at each step or you will run into issues as you try to adapt this code to your project (
Post#7 ).
Module 01_OutlineVersionLoop
This builds on the original outline code in my first post
Module 02_SecondOutlineVersion
This builds on the original outline code and adds your request about using a table to specify fields.
Module GlobalCode
Is exactly that, a place where a variable used by either Module_01 and Module_02 is kept and code that both of them call is placed
The code Chk4nCrtTblChnges should be straight forward to follow; however, I strongly caution about bloating the database when deleting and creating tables. I usually create a second instance of Access and create any temporary tables in that second instance so that the main database(s) stay fairly compact.
The two forms are just something I have in the template and do nothing except display the records.
>> Now, questions about this database need to be kept very narrow to stay on topic so look at your first post and consider your question.
If you're not sure the question will be on topic, simply start a new thread and paste a link back to this thread for context... extra threads are
not usually an issue :)
-Z