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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Querying Form Data

Status
Not open for further replies.

doorok

Technical User
Mar 20, 2003
10
0
0
US
I have a form that has a Charge field for entering a charge into a table. It also has a combo box with 2 columns. Column 1 is a description and column 2 is a percent value. When the user selects an item description and inputs a charge the total amount due (based on the [percent value]*charge) is then calculated in a third field using the following in the control source: Amount Due =([Charge])*[Item Description].Column(2). What I need to be able to do is then run a query that will show me Charges, Item Description, and Amount Due. I have no problem querying Charges and Item Description, because they are both already in tables. How would I be able to query the Amount Due field.

Thanks
 
[yinyang]

Add a new field to your table, called Amtdue say. You should then have this available in the field list box when designing the form. Don't add it though. Use the on change event in the text box (properties) that contains the calculation. Using the code builder you should be able to write directly to the record for the new field using

[amtdue]=[textbox1].text

assuming your calculation field is called textbox1.

The table is then completed and the query can be set up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top