Oat-so-simple but i dont have a clue

Turbo910

Registered User.
Local time
Today, 21:29
Joined
Nov 8, 2009
Messages
43
K im going to sound really silly now but i just cant figure it out.

I have a text box on my form called Quantity and it get its data automatically inputted from a combo box also on the form.

I then have another text box called Quantity_In that the user inputs a number. this hasnt had any configuring at all

Last but not least i have another text box called New Quantity which i have put a calculation in the control source in order to add the Quantity to the Quantity_In.

Now you would of thought this is simple right, it would work...

BUT!! ITS NOT! instead of adding the values its adding the number that the user inputs onto the end of the number that shows in Quantity. E.g. if the Quantity was 24 and the user added 2 it is showing in New Quantity as 242 instead of 26

The calculation that is in New Quantity control source is: =[Quantity]+[Quantity_In]

confused.gif
frown.gif


Please help!!
progress.gif
 
Are those text boxes number format?
 
What do you mena number format? how do i do this?

Regards
 
What do you mena number format? how do i do this?

Regards

I'm not trying to sound rude here but that is a very rudimentary thing to know. I believe that you need to take advantage of some free tutorials before going any further. You need to give yourself a base level of knowledge which will help you in working with Access. If you don't, you will be asking a lot of very simple questions which could be answered if you go through the tutorials.

Choose the version you need from the Free Tutorials From FunctionX:

Access 2007

Access 2007 VBA

Access 2003

Access 2003 VBA
 
And I can't resist the urge -

It is "OH so simple!" not OAT.

EDIT - "I apologize for the above comments as I didn't realize that was an advertising slogan."
 
Last edited:
HAHA ok ok i totally know where your coming from honestly and i will take your advise.

Sorry for wasting your time, i do have a basic knowing of access but i learnt that a long time ago and its just slipped my mind :/

Ill take it all on the chin
 
I hope you do the reading Bob suggests.

But what I'm getting at, is the fields these text boxes are bound to (In the tables) are they number format or text? That could be your issue.

If these are unbound it should work just fine, as I checked some unbound ones I have for arithmetic on one of my forms, and they work, so some more information would be needed, I.E. screenshots, code, or sample db, etc, so we can figure out what is going on, but check the number format first.
 
Last edited:
None of the text boxes are bound to any of my tables

I created them in the form using the controls.
 
OK, more info then please, some ex of what could help are in post #8
 
A quick fix should be:

=Val([Quantity])+Val([Quantity_In])
 
Bob, if that works, and we don't figure out why it isn't just "working" as is, what are some reasons that could happen? I haven't ever experienced it and am kind of curious.
 
Bob, if that works, and we don't figure out why it isn't just "working" as is, what are some reasons that could happen? I haven't ever experienced it and am kind of curious.

Something would be coercing it in as TEXT. But why, I'm not sure without seeing the actual database.
 
It works!

Ok like the other person i am also curious as to why the original calculation didnt work because if i was substracting or dividing it would, it just didnt add :S
 
Turbo, can you post your database? Strip out all nonessential info before you post, also compact and repair.

Then we can look at it and maybe figure it out. :)
 
See the attached image
 

Attachments

  • compactandrepair.gif
    compactandrepair.gif
    31.1 KB · Views: 66
Sorry guys its not letting me upload but i dont know why.
 
Try Zipping it up
 

Attachments

  • zip example.jpg
    zip example.jpg
    93.9 KB · Views: 61

Users who are viewing this thread

Back
Top Bottom