access 2003 Form Expression Problem

  • Thread starter Neal0o via AccessMonster.com
  • Start date
N

Neal0o via AccessMonster.com

A little background. I am tracking employee training electronically. I am
adding two unbound text boxes

=[HOURS1]+[HOURS2]


HOURS1 = 1 and Hours2 = 1

The Above Expression "=[HOURS1]+[HOURS2]" equals 11 on the form. It appears
that Access is
only displaying what in the unbound text boxes rather than adding them up.
I have changed the
table format / size etc.. to no avail.. I have about 20 unbound text boxes
to sum up but access just
displays the numbers rather than performing the expression.

=[HOURS1]+[HOURS2]+[HOURS3]+[HOURS4]+[HOURS5]+[HOURS6]+[HOURS7]+[HOURS8]+
[HOURS9]
+[HOURS10]+[HOURS11]+[HOURS12]+[HOURS13]+[HOURS14]+[HOURS15]+[HOURS16]+
[HOURS17]+
[HOURS18]+[HOURS19]+[HOURS20]+[HOURS21]

access displays 510.750.750.750.510.750.750.750.750.75... etc..


Thank you for looking!

Neal0o
 
G

Guest

If they are unbound, changing table definition won't affect this. Can you
change the formula to refer to the textbox control rather than the field?
Also, try Me.Hours1.Value + Me.,Hours2.Value.

Barry
 
N

Neal0o via AccessMonster.com

First of all, Thanks for your input..

The last message was using the textbox control name not field name. I tried
your example
and got invalid synaps I might add that the textbox control is also unbound
that is referenceing
the training class title.

Training Course 1 control
table/query
SELECT tblAogAnnualTrainingCourses.IDAnnualTraining,
tblAogAnnualTrainingCourses.[AOG ANNUAL TRAINING],
tblAogAnnualTrainingCourses.sngHours FROM tblAogAnnualTrainingCourses;

HOURS1 "control" (UNBOUND text box)
=[TRAINING COURSE 1].Column(2)
access automatically fills in the course instruction time dependant on which
course is selected.


TotalTime Control (UNBOUND TEXT BOX) "Want to total ALL of the Hours per
student"
=[HOURS1]+[HOURS2]+[HOURS3]+[HOURS4]+[HOURS5]+[HOURS6]+[HOURS7]+
[HOURS8]+[HOURS9]+[HOURS10]+[HOURS11]+[HOURS12]+[HOURS13]+[HOURS14]
+[HOURS15]+[HOURS16]+[HOURS17]+[HOURS18]+[HOURS19]+[HOURS20]+[HOURS21]

In the Form the SUM of the above unbound text box is "750.750.750.50.750.50.
750.750.510.750.750.750.510.750.750.750.750.750.5"

Its only displaying the courses times .75 or .5 or 1.0 hour

Thanks again for any help.




Barry said:
If they are unbound, changing table definition won't affect this. Can you
change the formula to refer to the textbox control rather than the field?
Also, try Me.Hours1.Value + Me.,Hours2.Value.

Barry
A little background. I am tracking employee training electronically. I am
adding two unbound text boxes
[quoted text clipped - 22 lines]
 
D

Douglas J. Steele

Try:

=Val(Nz[HOURS1],0))+Val(Nz([HOURS2],0))+Val(Nz([HOURS3],0)+....+Val(Nz([HOURS21],
0))

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Neal0o via AccessMonster.com said:
First of all, Thanks for your input..

The last message was using the textbox control name not field name. I
tried
your example
and got invalid synaps I might add that the textbox control is also
unbound
that is referenceing
the training class title.

Training Course 1 control
table/query
SELECT tblAogAnnualTrainingCourses.IDAnnualTraining,
tblAogAnnualTrainingCourses.[AOG ANNUAL TRAINING],
tblAogAnnualTrainingCourses.sngHours FROM tblAogAnnualTrainingCourses;

HOURS1 "control" (UNBOUND text box)
=[TRAINING COURSE 1].Column(2)
access automatically fills in the course instruction time dependant on
which
course is selected.


TotalTime Control (UNBOUND TEXT BOX) "Want to total ALL of the Hours per
student"
=[HOURS1]+[HOURS2]+[HOURS3]+[HOURS4]+[HOURS5]+[HOURS6]+[HOURS7]+
[HOURS8]+[HOURS9]+[HOURS10]+[HOURS11]+[HOURS12]+[HOURS13]+[HOURS14]
+[HOURS15]+[HOURS16]+[HOURS17]+[HOURS18]+[HOURS19]+[HOURS20]+[HOURS21]

In the Form the SUM of the above unbound text box is
"750.750.750.50.750.50.
750.750.510.750.750.750.510.750.750.750.750.750.5"

Its only displaying the courses times .75 or .5 or 1.0 hour

Thanks again for any help.




Barry said:
If they are unbound, changing table definition won't affect this. Can you
change the formula to refer to the textbox control rather than the field?
Also, try Me.Hours1.Value + Me.,Hours2.Value.

Barry
A little background. I am tracking employee training electronically. I
am
adding two unbound text boxes
[quoted text clipped - 22 lines]
 
N

Neal0o via AccessMonster.com

no good.. Please see my newest post going at this maybe from a different
direction?

Thank you,

Neal
Try:

=Val(Nz[HOURS1],0))+Val(Nz([HOURS2],0))+Val(Nz([HOURS3],0)+....+Val(Nz([HOURS21],
0))
First of all, Thanks for your input..
[quoted text clipped - 44 lines]
 
D

Douglas J. Steele

What "newest post"? If you're tallking about the post "Auto populate a Bound
Text Box ACCESS 2003", I see no correlation whatsoever between that question
and this one.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Neal0o via AccessMonster.com said:
no good.. Please see my newest post going at this maybe from a different
direction?

Thank you,

Neal
Try:

=Val(Nz[HOURS1],0))+Val(Nz([HOURS2],0))+Val(Nz([HOURS3],0)+....+Val(Nz([HOURS21],
0))
First of all, Thanks for your input..
[quoted text clipped - 44 lines]
 

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

Similar Threads

Untangle a mess 1

Top