LA Lawyer said:
I have added some code to do a lot of things that, frankly, I should have
included in the beginning. Now, I have a lot of records and want to run
thru them and "catch up" what I should have done earlier.
Excellent..that makes more sense.
In the above case, in most cases what you'll do then is not bother using the
actual four minutes events, this is far too difficult, far too clumsy, and
in most case it just doesn't really work. think of the banking system in
which they have to do some calculations on your accounts, they don't fire up
all the instant teller machines around the world and watched the little
forms do all kinds of dancing and flashing on the screens on the instant
teller machines as they want to update some of that data.
if you need to update some of the data in the tables, then write some
routines or update queries that modifies that code, it's inappropriate nor
even practical to attempt to use the form itself to go through and modified
a whole bunch of records at one time. forms are used interactivity with the
user, and can be programmed clear on to go and modify a whole bunch of
existing data.
Fortunately for your case there's ample programming update abilities built
into access and most database systems. So, you can and want to batch update
large numbers of records and modify their values.
say for example if you have a bunch of records that you need to modify some
city that was entered incorrectly, let's assume that you have a city name
and the value of
N. Y.
But, what you really wanted enter into that field was New York.
What you can do is create an update query. Simply fire up the query, drop in
the table, drop in that one column name "city" into the grid. you then in
the menu option choose query, then choose an update query
for the update to value, you type in
New York
And, for the condition field, you type in N. Y.
Now when you run this update query it'll update just those records with N.
Y. to New York.
you can also in theory to simply type in the SQL of such as
update tblCustomers set City = 'New York' where city = 'N. Y.'
And if you have a couple more complex conditions, you can even write some
code here. So in the data processing world it's extremely rare and generally
not even considered possible to try and make your form "run" for all of the
data in your database system, no more than a banking system trying to fire
up all the instant tellers all around the world to try and update the data.
Data processing just don't work that way.
So if you're need more complex conditions to modify existing records do
simply feel free to ask how would you update such and such records to such
and such values with such and such conditions. So batch updates or large
wholesale upating of many records is rarely if ever done through a form.
Forms are not designed nor even appropriate to attempt these kind of updates
on many records.