Oat-so-simple but i dont have a clue

As Homer Simpson would say, DOH! 2007 format. I only have 2003, Can you convert it to 2003, I am not sure how on that one as I do not have 2007 version.....
 
aha here you go

View attachment Inventory.zip

BTW i closed my database and restarted it and the solution bob gave that worked originaly well now its showing ####Error when its idle but the once i input a test value and press enter it does the function it should.
Any idea??

Im goign now but i will be back online tommorow at some point, send me a private meassage if not

Good night :)
 
I'll be checking this out later, after I get through traffic, leaving work in three mins. woohoo. Thanks for posting it in 2003 format. :)
 
Didn't I see this elsewhere?

This actually goes back into the time before Visual Basic, before QuickBasic 4.5/QBasic, when everything had to have a declared data type! As the OP noted, using subtraction/division/multiplication works without a problem, without the datatype be declared thru formatting or assigning of a datatype. That's because these operations can only be performed on numeric data types! But use of the plus sign can be taken either as addition (if a numeric data type is involved) or as concatenation (if a text data type is involved) and so Access needs guidance. Left alone, it does, indeed, assume that a textbox contains text! So, in order to an unbound controls to actually be added, you have to, in some manner, left Access know what type of data they are. You can use Val(), as suggested above, or CInt() as suggested elsewhere, or format the textbox as a number. But you have to give Access a clue as to what kind of data it's dealing with!
 
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

If it worked when trying to subtract or divide, I believe it may be because Access is interpreting the '+' as an '&'.
Correct me if I'm wrong, but it's my understanding that the two are often interchangeable in Access...?
 
If it worked when trying to subtract or divide, I believe it may be because Access is interpreting the '+' as an '&'.
Correct me if I'm wrong, but it's my understanding that the two are often interchangeable in Access...?

Sorry, didn't refresh my screen! MissingLinq provides the better explanation!
 
Ok so what code should i input to get this to work correctly and where should i input it?

Thanks guys
 
As Bob told you, 15 or 16 posts ago, replace

=[Quantity] + [Quantity_In]


with

=Val([Quantity]) + Val([Quantity_In])
 
I have doen this but like i said before when the text box is idle I.e i havent pressed enter, it is showing #Error until i do press enter?
 
Try using Nz() to account for Null values in your "idle" textboxes.

=Val(Nz([Quantity], 0)) +Val(Nz([Quantity_In], 0))
 
And I can't resist the urge -

It is "OH so simple!" not OAT.

Turbo910 was quoting a reasonably well known advertising slogan from here in the UK, probably not realising that many of the most helpful people on this forum are from "across the pond" and wouldn't get it.
 
Turbo910 was quoting a reasonably well known advertising slogan from here in the UK, probably not realising that many of the most helpful people on this forum are from "across the pond" and wouldn't get it.

Ok.... That makes a whole lot more sense, Thanks for the explanation :D. Also Thanks to Missinglinq as I did not know that about the text boxes...
 
Turbo910 was quoting a reasonably well known advertising slogan from here in the UK, probably not realising that many of the most helpful people on this forum are from "across the pond" and wouldn't get it.

Aha! :D - Funny how that can happen in either direction. We've had some of the same come from our side and people on your side say "What???" :)

The things that can happen with a worldwide audience, eh?
 

Users who are viewing this thread

Back
Top Bottom