Newbie Question..Lost with Msg Box

WackoWOlf

New member
Local time
Today, 14:10
Joined
Jan 3, 2006
Messages
9
I am trying to do a simple querry
I am trying to do a querry were I have the product #, product, amount in stock, and the price.
All i want to do is get the total amount. I am useing this for a calculation.
amount on hand * price. I have this in a new field, the problem is that when I run it, it comes up with a msg box asking me for the amount on hand * price.

What am I doing wrong, or is it what am I suppose to put in the msg box. Everytime I put something in the box, that is what shows up in the field.
Plese Help.

Thank You
WackoWolf
 
Hi - and welcome!

You are getting a message box because Access doesn't recognize the fields that you are using, so the program is asking you to supply the values.

Check that you have typed all the field names correctly. If you are using spaces in the fieldnames, I recommend that you get rid of all of them (have to start at the table).

Generally, if you have the following fields (notice the example names)
ProductNumber
ProductName
AmtInStock
UnitPrice

Then you would need to enter this into a query field -

ExtendedPrice:AmtInStock*UnitPrice

If you still have questions, please post back.

- gromit
 
Thank You

I re-did the table as a test, and yes your right i see were my mistakes were.
First I was miss spelling, and I was useing brackets.

Thank you.. Now I can try the rest of the querys that i want to do. Will post if there are any more questions
 
Is there a reason that I can't use spaces?
like Product Name instead of ProductName
 
You actually can use spaces, but then you have to ensure that you delimit the name of the field with brackets. E.g. [Amt in Stock]. It can also cause problems down the line using Visual Basic or if you ever export to another database program.

I just find it simpler to eliminate them and try to stay out of trouble!
 

Users who are viewing this thread

Back
Top Bottom