Using calculated fields on a form

broadbean

Registered User.
Local time
Today, 10:57
Joined
Oct 24, 2007
Messages
15
I have a form where the record source is a table.
The form has about 5 calculated fields on it.
The screen flickers quite badly and at the bottom says calculating.
Sometimes the database locks up.
To stop this flickering i created a query so that the calculations
are done in the query. Then i linked the form to the query instead of
the table. Am i doing this correctly as i didn' think the table
would show any new data that i entered into the form but it does seem
to work. Is it because i am only using one table.
I am using Access 2003.
I've seen on Youtube a tutorial where in later versions of access you can
have a calculated field in a table. Is this a better way of doing it ?
Can you do this in Access 2003 ?
 
This will require a bit more of an explanation. Start with table and form structure and what are your calculated fields for? Do the results need to be stored or are they just for viewing at the time? Post a copy of your DB if possible (zipped)
 
I use A2003 and also had a problem with flickering on a sub form. It was a while ago now but if memory serves me right, I think it was solved by getting service pack 3 for access 2003.
 
The calculated fields were put on the form so the operator didn't have to work everything out by calculator. So magnesium to magnesium oxide. Sodium to sodium chloride e.t.c
Just had =sodium*2.5422 for example. Operator would type sodium in and it would work out sodium chloride I.e NaCl
this was then stored in a field called NaCL. Should I have used an unbound text box. I guess the calculated value doesnt need to be stored.but I thought that when i produced reports i could just use the NaCl field without having calculations built in the reports design. Flickering seemed a lot worse after windows 7.0 was put on having used xp in the past but don't know if that has anything to do with it.
 
How do you have the calculated fields set to run? Do they update as you type or are they run when you exit a particular field? If you have a lot of calculated fields which are set to update as you type (real time) that could explain the flickering and crashes. They should be set to run after you exit the field they are looking at for the calculation.
 
The database is on 4 computers at work, i.e the same front end on each machine. Three of the machines cause flickering whilst the fourth machine does not flicker. I don't understand. Is exactly same front end.
Normally when i open the form i see calculating at the bottom left of the screen. this stays there until i click into a field and then it stops flickering.
On the machine that does not flicker you see calculating for a brief second and then it stops. On other machines it flickers until you click in a field and then it stops.
Could it be the speed of the processor ? There is some slight difference as all machines are not quite the same.
What does the Echo Off command do ?
 
Echo off will turn off screen updating in access. It can be useful if you are running macro/vba code which has visible effects on the screen. But you need to remember to turn echo back on at the end of the command. I have really only used in excel vba though.

If selecting a field stops the flicker try adding some vba on form open to set focus to one of the fields. If your happy to post a sample of your db and I will have a look.
 

Users who are viewing this thread

Back
Top Bottom