John,
Thanks for the work. Could you attached the program so I could see it and learn from it too ?
:-)
John,
Thanks for the work. Could you attached the program so I could see it and learn from it too ?
:-)
Hi -
Here you are, the test database. There is no data in it, but the Fill_Table routine does that. I have put several comments into the routine to explain what it does. If you have one of your own tables to use, so much the better, but you might have to modify the code and queries to use to right field names.
Here is the latest summary as output from Fill_Table:
Code:Number of records in the main file: 1000000 Time required to create the main file: 02.417 minutes Requested sample size: 32.26% Time required to calculate the sample sizes: 3 seconds Time required to extract the sample data set: 322592 records in 01.217 minutes Expected number of sample records: 322570 ( 32.26% of 1000000 ) Actual number of sample records: 322592
Note the discrepancy between expected number of sample records and the actual number (in red above). This is not an error; rather it is due to the rounding (to integer) used when the required sample sizes are calculated. I don't think there is anything that can (or should) be done about that - it's the same effect as you see sometimes in surveys where the results don't add to 100% due to rounding.
Hope this helps - don't hesitate to ask for clarifications.
John
cool thanks for sharing. I see the fill Table Routine. I will look and grasp some concept and let you know if I have any questions. :-)
Hi John,
sorry just go to you.
You have three tables, main data, main data summary, and sample data set.
Then you have two queries that appends. one is Fill summary table, and the other is Sampling Query. And you have Totals.
So what are each of the table and each of the queries do.
I am trying to figure out.
In Moduel1, you have the VBA, and what does the General do ?
Thanks
J