Refreshing info

dbprogman

Registered User.
Local time
Today, 15:51
Joined
Mar 29, 2005
Messages
35
Hi All,

Here's a puzzle I hope someone can help solve, I have a database (great start) that has an extensive array of event procedures on its form to calculate dates etc. However as a lot of these procedures are on after update events when data is entered directly into the table the form wont reflect changes. Obviously if a user alters the field then the after update event is activated, this could be a pain in the proverbial as there maybe hundreds of records updated directly to the tables daily. Is their a procedure I can perform that will cause these procedures to activate on data entered directly into the table?
 
You have a major design flaw if your users are updating data directly in the table. The users should only be allowed to view/edit data from within a form so that you can control what they do. There are no "events" directly within a table.

You can requery the form when needed. Requerying a field or control is slightly differnet and the Access VBA help files will give your examples on how to requery your form data.
 
Table input

Users do not input data via a table the data is imported from an external source.
 
then you will need to use queris/code to massage the data the way you want it then. You may want to import to a tempoary table and work on it there before appending it to your main table. It all depends on what you are doing and whether or not you can tell if it has been done.


Peter
 
If you simply need to refresh the data, if running from a query as the data source for the form, you can write an on timer event that trigger the following line of code.

docmd.runcommand.accmdrefresh
 
Support Appreciated

I haven't tried your last suggestion as yet but I thought I would clarify things a little more for you.

I have a major database that is populated by both a user via a form and by automated downloads directly to the tables. The problem exists that all calculations are performed on the form via after update events etc. The data entered directly to the tables therefore are not calculated on the form until a user activates the after update event, as stated earlier there are literally hundreds of files being downloaded daily. I need a solution that would see all data imported into the tables recieve the same events as those directly entered on the form. Possibly when ever the form opens event procedures are activated eg.

Forms datasource are tables not queries.

Any help is good help and once again thanks
dbprogman
:cool:
 
can you recreate the calculations in a query, possibly with the use of custom functions? You could then use an update query to convert the data already in the table.
It may be possible to code the form to step through each record and fire off the Update events of all of the controls but it will be sloow and with hundreds of records being added daily it will just get slower.

Peter
 

Users who are viewing this thread

Back
Top Bottom