Unbound field calculation save in table

S

sharrg2

I have a score form that I created in Access 2003 the only part of the score
sheet I am interested in saving to the table is the total score. Because the
score sheet is all unbound fields and the total score is a control source
calculation how can I save the total score to a field in the table called
score.
 
M

Marshall Barton

sharrg2 said:
I have a score form that I created in Access 2003 the only part of the score
sheet I am interested in saving to the table is the total score. Because the
score sheet is all unbound fields and the total score is a control source
calculation how can I save the total score to a field in the table called
score.


To do that, you need to calculate the total in a VBA
procedure. The procedure can then set the result to a bound
field or execute a query to save it to the table.

However, it is almost always better to save all the values
in the score sheet in a table and recalculate the total
whenever you want to display it on a form or report.
 
S

sharrg2

Marshall Barton said:
sharrg2 said:
I have a score form that I created in Access 2003 the only part of the score
sheet I am interested in saving to the table is the total score. Because the
score sheet is all unbound fields and the total score is a control source
calculation how can I save the total score to a field in the table called
score.


To do that, you need to calculate the total in a VBA
procedure. The procedure can then set the result to a bound
field or execute a query to save it to the table.

However, it is almost always better to save all the values
in the score sheet in a table and recalculate the total
whenever you want to display it on a form or report.

--
Marsh
MVP [MS Access]
.
Thank you for the quick response
There are so many fields on the score form that I do not need to save any of
the scores just the total. How would I wright a VB code for Score Total =
Score The Score is what I need to save in the table and that is the name of
the field that is bound.

Can you help on this I am not that great at getting VB Codes to work?
 
M

Marshall Barton

sharrg2 said:
There are so many fields on the score form that I do not need to save any of
the scores just the total. How would I wright a VB code for Score Total =
Score The Score is what I need to save in the table and that is the name of
the field that is bound.

We need to translate the Score Total text box expression to
VBA code. I will have to see the expression before can try
to help translate it.

Is the form bound to the Scores table?

If not, how can we tell which record in the table should be
updated.

Or are we going to add the score as a new record? If so,
what other fields need to be in the new record and where do
these other field values come from.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top