Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with forms please

Status
Not open for further replies.

vince99

IS-IT--Management
Mar 1, 2001
63
US
I have created a form where a user can select different products and the price of that product will be displayed in a text box. Once the user has finished selecting products, an order total is given. Is it possible to have this value stored in a table so I can reference it later?

Thanks for the help.....

 
It will depend on how you have the table with the products and prices designed. I'll guess that you have at least four fields; ProductID, Price, UserID (or OrderID), and a check box for the user to select.
If you have something like that I might try an Append query with
Total AS Sum(Price)
WHERE the check box field=True
Group By OrderID

That should give you the total for any products that were checked and append the value to a table.
Hope this helps,
 
What I want to do is:

On the form, I have a box that holds the order total.

I want that total to be put in a table. How can this be

done?

Thanks in advanced
 
How's this:
Create an Append query like this one

INSERT INTO TableTotals (Total)
VALUES (Forms!NameOfTheForm!Total);

Save it and when the form is closed use code to run the query.
Or
Just have the users run the query when they want to record the total.

Check out the online help. Search "INSERT INTO statement" in the Index.
 
Never store calculated values! This is one of the biggest database DON'Ts. This creates all kinds of problematic situations. Redundancy, unnecessary storage overhead, and the possibility that the values used to calculate that particular total change and thus don't match up. Rob Marriott
rob@career-connections.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top